freebsd-src/release/extract.sh

42 lines
1.1 KiB
Bash
Raw Normal View History

#!/bin/sh
# $Id: extract.sh,v 1.15 1994/11/21 04:14:33 phk Exp $
PATH=/stand:$PATH
1994-11-10 02:24:47 +00:00
DDIR=/
1994-11-21 04:14:33 +00:00
if [ -f bindist.aa ] ; then
# Temporary kludge for pathological bindist.
if [ -f $DDIR/etc/myname ]; then
cp $DDIR/etc/hosts $DDIR/etc/myname $DDIR/stand/etc
fi
if [ -f $DDIR/etc/defaultrouter ]; then
cp $DDIR/etc/defaultrouter $DDIR/stand/etc
fi
echo; echo "Extracting bindist, please wait."
1994-11-21 04:14:33 +00:00
cat bindist.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu )
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
if [ -f $DDIR/stand/etc/defaultrouter ]; then
cp $DDIR/stand/etc/defaultrouter $DDIR/etc
fi
chmod 1777 /tmp
rm -f /sys
ln -s /usr/src/sys /sys
1994-11-06 23:47:06 +00:00
fi
1994-11-10 02:24:47 +00:00
for i in *.aa
do
b=`basename $i .aa`
if [ "$b" != bin_tgz ] ; then
1994-11-21 04:14:33 +00:00
if [ "$b" = des ] ; then
1994-11-10 03:22:27 +00:00
# We cannot replace /sbin/init while it runs
# so move it out of the way for now
1994-11-21 04:14:33 +00:00
mv /sbin/init /sbin/non_des_init
1994-11-10 03:22:27 +00:00
fi
echo "Extracting $b"
cat $b.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu )
1994-11-10 02:24:47 +00:00
fi
done