]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - release/extract.sh
This commit was generated by cvs2svn to compensate for changes in r4922,
[FreeBSD/FreeBSD.git] / release / extract.sh
1 #!/bin/sh
2 # $Id: extract.sh,v 1.15 1994/11/21 04:14:33 phk Exp $
3 PATH=/stand:$PATH
4 DDIR=/
5
6 if [ -f bindist.aa ] ; then
7         # Temporary kludge for pathological bindist.
8         if [ -f $DDIR/etc/myname ]; then
9                 cp $DDIR/etc/hosts $DDIR/etc/myname $DDIR/stand/etc
10         fi
11         if [ -f $DDIR/etc/defaultrouter ]; then
12                 cp $DDIR/etc/defaultrouter $DDIR/stand/etc
13         fi
14         echo; echo "Extracting bindist, please wait." 
15         cat bindist.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu )
16         if [ -f $DDIR/stand/etc/myname ]; then
17                 # Add back what the bindist nuked.
18                 cp $DDIR/stand/etc/myname $DDIR/etc
19                 cat $DDIR/stand/etc/hosts >> $DDIR/etc/hosts
20         fi
21         if [ -f $DDIR/stand/etc/defaultrouter ]; then
22                 cp $DDIR/stand/etc/defaultrouter $DDIR/etc
23         fi
24         chmod 1777 /tmp
25         rm -f /sys
26         ln -s /usr/src/sys /sys
27 fi
28
29 for i in *.aa
30 do
31         b=`basename $i .aa`
32         if [ "$b" != bin_tgz ] ; then
33                 if [ "$b" = des ] ; then
34                         # We cannot replace /sbin/init while it runs
35                         # so move it out of the way for now
36                         mv /sbin/init /sbin/non_des_init
37                 fi
38                 echo "Extracting $b"
39                 cat $b.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu )
40         fi
41 done