Annotation of 43BSDTahoe/sys/vaxdist/get, revision 1.1.1.1

1.1       root        1: #!/bin/sh
                      2: #
                      3: # Copyright (c) 1983 Regents of the University of California.
                      4: # All rights reserved.  The Berkeley software License Agreement
                      5: # specifies the terms and conditions for redistribution.
                      6: #
                      7: #      @(#)get 4.26 (Berkeley) 2/29/88
                      8: #
                      9: # Shell script to build a mini-root file system
                     10: # in preparation for building a distribution tape.
                     11: # The file system created here is image copied onto
                     12: # tape, then image copied onto disk as the "first"
                     13: # step in a cold boot of 4.3 systems.
                     14: #
                     15: DISTROOT=/nbsd
                     16: #
                     17: if [ `pwd` = '/' ]
                     18: then
                     19:        echo You just '(almost)' destroyed the root
                     20:        exit
                     21: fi
                     22: cp $DISTROOT/sys/GENERIC/vmunix .
                     23: rm -rf bin; mkdir bin
                     24: rm -rf etc; mkdir etc
                     25: rm -rf a; mkdir a
                     26: rm -rf tmp; mkdir tmp
                     27: rm -rf usr; mkdir usr usr/mdec
                     28: rm -rf sys; mkdir sys sys/floppy sys/cassette sys/consolerl
                     29: cp $DISTROOT/etc/disktab etc
                     30: cp $DISTROOT/etc/newfs etc
                     31: cp $DISTROOT/etc/mkfs etc
                     32: cp $DISTROOT/etc/restore etc
                     33: cp $DISTROOT/etc/init etc
                     34: cp $DISTROOT/etc/mount etc
                     35: cp $DISTROOT/etc/mknod etc
                     36: cp $DISTROOT/etc/fsck etc
                     37: cp $DISTROOT/etc/umount etc
                     38: cp $DISTROOT/etc/arff etc
                     39: cp $DISTROOT/etc/flcopy etc
                     40: cp $DISTROOT/bin/mt bin
                     41: cp $DISTROOT/bin/ed bin
                     42: cp $DISTROOT/bin/ls bin
                     43: cp $DISTROOT/bin/sh bin
                     44: cp $DISTROOT/bin/mv bin
                     45: cp $DISTROOT/bin/sync bin
                     46: cp $DISTROOT/bin/cat bin
                     47: cp $DISTROOT/bin/mkdir bin
                     48: cp $DISTROOT/bin/stty bin; ln bin/stty bin/STTY
                     49: cp $DISTROOT/bin/echo bin
                     50: cp $DISTROOT/bin/rm bin
                     51: cp $DISTROOT/bin/cp bin
                     52: cp $DISTROOT/bin/expr bin
                     53: cp $DISTROOT/bin/[ bin
                     54: cp $DISTROOT/bin/awk bin
                     55: cp $DISTROOT/bin/make bin
                     56: cp $DISTROOT/usr/mdec/* usr/mdec
                     57: cp $DISTROOT/sys/floppy/[Ma-z0-9]* sys/floppy
                     58: cp $DISTROOT/sys/consolerl/[Ma-z0-9]* sys/consolerl
                     59: cp -r $DISTROOT/sys/cassette/[Ma-z0-9]* sys/cassette
                     60: cp $DISTROOT/sys/stand/boot boot
                     61: cp $DISTROOT/sys/stand/pcs750.bin pcs750.bin
                     62: cp $DISTROOT/.profile .profile
                     63: cat >etc/passwd <<EOF
                     64: root::0:10::/:/bin/sh
                     65: EOF
                     66: cat >etc/group <<EOF
                     67: wheel:*:0:
                     68: staff:*:10:
                     69: EOF
                     70: cat >etc/fstab <<EOF
                     71: /dev/hp0a:/a:xx:1:1
                     72: /dev/up0a:/a:xx:1:1
                     73: /dev/hk0a:/a:xx:1:1
                     74: /dev/ra0a:/a:xx:1:1
                     75: /dev/rb0a:/a:xx:1:1
                     76: EOF
                     77: cat >xtr <<'EOF'
                     78: : ${disk?'Usage: disk=xx0 type=tt tape=yy xtr'}
                     79: : ${type?'Usage: disk=xx0 type=tt tape=yy xtr'}
                     80: : ${tape?'Usage: disk=xx0 type=tt tape=yy xtr'}
                     81: echo 'Build root file system'
                     82: newfs ${disk}a ${type}
                     83: sync
                     84: echo 'Check the file system'
                     85: fsck /dev/r${disk}a
                     86: mount /dev/${disk}a /a
                     87: cd /a
                     88: echo 'Rewind tape'
                     89: mt -f /dev/${tape}0 rew
                     90: echo 'Restore the dump image of the root'
                     91: restore rsf 3 /dev/${tape}0
                     92: cd /
                     93: sync
                     94: umount /dev/${disk}a
                     95: sync
                     96: fsck /dev/r${disk}a
                     97: echo 'Root filesystem extracted'
                     98: echo
                     99: echo 'If this is an 8650 or 8600, update the console rl02'
                    100: echo 'If this is a 780 or 785, update the floppy'
                    101: echo 'If this is a 730, update the cassette'
                    102: EOF
                    103: chmod +x xtr
                    104: rm -rf dev; mkdir dev
                    105: cp $DISTROOT/sys/dist/MAKEDEV dev
                    106: chmod +x dev/MAKEDEV
                    107: cp /dev/null dev/MAKEDEV.local
                    108: cd dev
                    109: ./MAKEDEV std hp0 hk0 up0 ra0 rb0
                    110: ./MAKEDEV ts0; mv rmt12 ts0; rm *mt*;
                    111: ./MAKEDEV tm0; mv rmt12 tm0; rm *mt*;
                    112: ./MAKEDEV ht0; mv rmt12 ht0; rm *mt*;
                    113: ./MAKEDEV ut0; mv rmt12 ut0; rm *mt*;
                    114: ./MAKEDEV mt0; mv rmt12 xt0; rm *mt*; mv xt0 mt0
                    115: cd ..
                    116: sync

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.