Commit | Line | Data |
---|---|---|
8249ff6a | 1 | #!/bin/sh - |
a15338de | 2 | # |
2f3b6349 | 3 | # Copyright (c) 1990 The Regents of the University of California. |
8249ff6a | 4 | # All rights reserved. |
a15338de | 5 | # |
2f3b6349 | 6 | # %sccs.include.redist.sh% |
a15338de | 7 | # |
2f3b6349 | 8 | # @(#)maketape 5.7 (Berkeley) %G% |
8249ff6a KB |
9 | # |
10 | ||
11 | # maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ] | |
a15338de | 12 | miniroot=dk4a |
0a5681aa | 13 | bootroot=dk2b |
a15338de | 14 | nbsd=dk1a |
ac7c2b9d | 15 | nbsdusr=dk0c |
db4af07e MK |
16 | tape=/dev/rmt20 |
17 | type=6250 | |
0a5681aa KB |
18 | block=40 |
19 | tflag=cbf | |
20 | bprog="/usr/local/20b 20480" | |
a15338de | 21 | |
2f3b6349 KB |
22 | if [ $# -gt 0 ]; then |
23 | type=$1; | |
24 | fi | |
25 | ||
26 | if [ $# -gt 1 ]; then | |
27 | tape=$2; | |
28 | fi | |
29 | ||
a15338de | 30 | tartape=$tape |
2f3b6349 KB |
31 | if [ $# -gt 2 ]; then |
32 | remote=$3; | |
33 | tartape='-'; | |
34 | fi | |
a15338de | 35 | |
2f3b6349 | 36 | rsh $remote mt -t ${tape} rew |
a15338de KM |
37 | date |
38 | umount /dev/$nbsdusr | |
39 | umount /dev/$nbsd | |
40 | mount -r /dev/$nbsd /nbsd | |
41 | mount -r /dev/$nbsdusr /nbsd/usr | |
42 | cd /nbsd | |
43 | sync | |
44 | ||
db4af07e MK |
45 | if [ $type = '1600a' ] |
46 | then | |
47 | type=1600 | |
48 | fi | |
49 | ||
ac7c2b9d KB |
50 | echo "Install image of bootstrap file system" |
51 | eval dd if=/dev/r${bootroot} count=750 bs=1024 conv=sync ${remote+"| rsh"} \ | |
0a5681aa | 52 | ${remote-"of=$tape"} ${remote+'/usr/local/20b 1024 ">" $tape'} |
db4af07e | 53 | |
a15338de | 54 | echo "Add image of mini-root file system" |
0a5681aa | 55 | eval dd if=/dev/r${miniroot} count=205 bs=10240 conv=sync ${remote+"| rsh"} \ |
a15338de | 56 | ${remote-"of=$tape"} ${remote+'/usr/local/20b ">" $tape'} |
db4af07e | 57 | |
a15338de | 58 | echo "Add full dump of real file system" |
2f3b6349 KB |
59 | /sbin/${remote+r}dump 0f $remote${remote+:}${tape} /nbsd |
60 | ||
a15338de | 61 | echo "Add tar image of /usr" |
2f3b6349 KB |
62 | cd /nbsd/usr |
63 | tar ${tflag} ${block} ${tartape} bin contrib games include lib libdata \ | |
64 | libexec local obj old sbin share | rsh $remote ${bprog} ">" $tape | |
65 | ||
a15338de KM |
66 | if [ ${type} != '6250' ] |
67 | then | |
68 | echo "Done, rewinding first tape" | |
2f3b6349 | 69 | rsh $remote mt -t ${tape} rew & |
a15338de KM |
70 | echo "Mount second tape and hit return when ready" |
71 | echo "(or type name of next tape drive)" | |
72 | read x | |
73 | if [ "$x" != "" ] | |
74 | then tape=$x | |
75 | fi | |
76 | fi | |
db4af07e MK |
77 | |
78 | : tape2: | |
a15338de | 79 | echo "Add user source code" |
2f3b6349 KB |
80 | FILES="Makefile bin etc games include kerberosIV lib libexec old \ |
81 | pgrm sbin share usr.bin usr.sbin" | |
82 | cd /nbsd/usr/src | |
83 | tar ${tflag} ${block} ${tartape} ${FILES} | rsh $remote ${bprog} ">" $tape | |
db4af07e | 84 | |
a15338de | 85 | #echo "Add varian fonts" |
2f3b6349 KB |
86 | #cd /usr/lib/vfont |
87 | #tar ${tflag} ${block} ${tartape} . ${remote+'| $remote ${bprog} ">" $tape'} | |
a15338de KM |
88 | if [ ${type} != '6250' ] |
89 | then | |
90 | echo "Done, rewinding second tape" | |
91 | $remote mt -t ${tape} rew & | |
92 | echo "Mount third tape and hit return when ready" | |
93 | echo "(or type name of next tape drive)" | |
94 | read x | |
95 | if [ "$x" != "" ] | |
96 | then tape=$x | |
97 | fi | |
98 | fi | |
db4af07e MK |
99 | |
100 | : tape3: | |
0a5681aa | 101 | echo "Add tar image of system sources" |
2f3b6349 KB |
102 | cd /nbsd/usr/src/sys |
103 | tar ${tflag} ${block} ${tartape} . | rsh $remote ${bprog} ">" $tape | |
0a5681aa | 104 | |
a15338de | 105 | echo "Add user contributed software" |
db4af07e | 106 | # standard (always uncompressed) directories: |
2f3b6349 KB |
107 | FILES="Makefile Makefile.inc ansi bib emacs emacs-18.55.tar.Z jove kermit \ |
108 | mh.tar.Z patch rcs vmsprep" | |
109 | cd /nbsd/usr/src/contrib | |
110 | tar ${tflag} ${block} ${tartape} ${FILES} | rsh $remote ${bprog} ">" $tape | |
db4af07e MK |
111 | |
112 | #echo "Add ingres source" | |
0a5681aa | 113 | #cd /nbsd/usr/ingres; eval tar ${tflag} ${block} ${tartape} . \ |
2f3b6349 | 114 | # ${remote+'| rsh $remote ${bprog} ">" $tape'} |
db4af07e | 115 | |
a15338de | 116 | echo "Done, rewinding tape" |
2f3b6349 | 117 | rsh $remote mt -t ${tape} rew & |