1994-11-08 12:14:45 +01:00
|
|
|
#!/bin/sh
|
1994-12-04 04:41:18 +01:00
|
|
|
# $Id: extract.sh,v 1.16 1994/11/29 00:56:30 jkh Exp $
|
1994-11-17 12:53:14 +01:00
|
|
|
PATH=/stand:$PATH
|
1994-11-10 03:24:47 +01:00
|
|
|
DDIR=/
|
|
|
|
|
1994-11-21 05:14:33 +01:00
|
|
|
if [ -f bindist.aa ] ; then
|
1994-11-08 12:17:29 +01:00
|
|
|
# Temporary kludge for pathological bindist.
|
1994-11-12 10:55:29 +01:00
|
|
|
if [ -f $DDIR/etc/myname ]; then
|
|
|
|
cp $DDIR/etc/hosts $DDIR/etc/myname $DDIR/stand/etc
|
|
|
|
fi
|
1994-11-18 11:22:39 +01:00
|
|
|
if [ -f $DDIR/etc/defaultrouter ]; then
|
|
|
|
cp $DDIR/etc/defaultrouter $DDIR/stand/etc
|
|
|
|
fi
|
1994-11-17 12:53:14 +01:00
|
|
|
echo; echo "Extracting bindist, please wait."
|
1994-11-21 05:14:33 +01:00
|
|
|
cat bindist.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu )
|
1994-11-12 10:55:29 +01:00
|
|
|
if [ -f $DDIR/stand/etc/myname ]; then
|
|
|
|
# Add back what the bindist nuked.
|
|
|
|
cp $DDIR/stand/etc/myname $DDIR/etc
|
|
|
|
cat $DDIR/stand/etc/hosts >> $DDIR/etc/hosts
|
|
|
|
fi
|
1994-11-18 11:22:39 +01:00
|
|
|
if [ -f $DDIR/stand/etc/defaultrouter ]; then
|
|
|
|
cp $DDIR/stand/etc/defaultrouter $DDIR/etc
|
|
|
|
fi
|
1994-11-29 01:56:30 +01:00
|
|
|
chmod 1777 /tmp
|
|
|
|
rm -f /sys
|
|
|
|
ln -s /usr/src/sys /sys
|
1994-11-07 00:47:06 +01:00
|
|
|
fi
|
1994-11-10 03:24:47 +01:00
|
|
|
|
|
|
|
for i in *.aa
|
|
|
|
do
|
|
|
|
b=`basename $i .aa`
|
1994-12-04 04:41:18 +01:00
|
|
|
if [ "$b" != bindist ] ; then
|
1994-11-21 05:14:33 +01:00
|
|
|
if [ "$b" = des ] ; then
|
1994-11-10 04:22:27 +01:00
|
|
|
# We cannot replace /sbin/init while it runs
|
|
|
|
# so move it out of the way for now
|
1994-11-21 05:14:33 +01:00
|
|
|
mv /sbin/init /sbin/non_des_init
|
1994-11-10 04:22:27 +01:00
|
|
|
fi
|
1994-11-10 03:47:06 +01:00
|
|
|
echo "Extracting $b"
|
1994-11-18 11:05:47 +01:00
|
|
|
cat $b.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu )
|
1994-11-10 03:24:47 +01:00
|
|
|
fi
|
|
|
|
done
|