Commit | Line | Data |
---|---|---|
8249ff6a | 1 | #!/bin/sh - |
a15338de | 2 | # |
8249ff6a KB |
3 | # Copyright (c) 1988 Regents of the University of California. |
4 | # All rights reserved. | |
a15338de | 5 | # |
8249ff6a KB |
6 | # Redistribution and use in source and binary forms are permitted |
7 | # provided that the above copyright notice and this paragraph are | |
8 | # duplicated in all such forms and that any documentation, | |
9 | # advertising materials, and other materials related to such | |
10 | # distribution and use acknowledge that the software was developed | |
11 | # by the University of California, Berkeley. The name of the | |
12 | # University may not be used to endorse or promote products derived | |
13 | # from this software without specific prior written permission. | |
14 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
15 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
16 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
a15338de | 17 | # |
8249ff6a KB |
18 | # @(#)maketape 5.5 (Berkeley) %G% |
19 | # | |
20 | ||
21 | # maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ] | |
a15338de | 22 | miniroot=dk4a |
0a5681aa | 23 | bootroot=dk2b |
a15338de KM |
24 | nbsd=dk1a |
25 | nbsdusr=dk2c | |
db4af07e MK |
26 | tape=/dev/rmt20 |
27 | type=6250 | |
0a5681aa KB |
28 | block=40 |
29 | tflag=cbf | |
30 | bprog="/usr/local/20b 20480" | |
a15338de KM |
31 | |
32 | if [ $# -gt 0 ]; then type=$1; fi | |
33 | if [ $# -gt 1 ]; then tape=$2; fi | |
34 | tartape=$tape | |
35 | if [ $# -gt 2 ]; then remote=$3; tartape='-'; fi | |
36 | ||
37 | $remote mt -t ${tape} rew | |
38 | date | |
39 | umount /dev/$nbsdusr | |
40 | umount /dev/$nbsd | |
41 | mount -r /dev/$nbsd /nbsd | |
42 | mount -r /dev/$nbsdusr /nbsd/usr | |
43 | cd /nbsd | |
44 | sync | |
45 | ||
db4af07e MK |
46 | if [ $type = '1600a' ] |
47 | then | |
48 | type=1600 | |
49 | fi | |
50 | ||
a15338de | 51 | echo "Add image of bootstrap file system" |
0a5681aa KB |
52 | eval dd if=/dev/r${bootroot} count=600 bs=1024 conv=sync ${remote+"| rsh"} \ |
53 | ${remote-"of=$tape"} ${remote+'/usr/local/20b 1024 ">" $tape'} | |
db4af07e | 54 | |
a15338de | 55 | echo "Add image of mini-root file system" |
0a5681aa | 56 | eval dd if=/dev/r${miniroot} count=205 bs=10240 conv=sync ${remote+"| rsh"} \ |
a15338de | 57 | ${remote-"of=$tape"} ${remote+'/usr/local/20b ">" $tape'} |
db4af07e | 58 | |
a15338de KM |
59 | echo "Add full dump of real file system" |
60 | /etc/${remote+r}dump 0uf $remote${remote+:}${tape} /nbsd | |
61 | echo "Add tar image of /usr" | |
0a5681aa | 62 | cd /nbsd/usr; eval tar ${tflag} ${block} ${tartape} adm bin dict doc games \ |
a15338de KM |
63 | guest hosts include lib local man msgs new \ |
64 | preserve pub spool tmp ucb \ | |
0a5681aa | 65 | ${remote+'| $remote ${bprog} ">" $tape'} |
a15338de KM |
66 | if [ ${type} != '6250' ] |
67 | then | |
68 | echo "Done, rewinding first tape" | |
69 | $remote mt -t ${tape} rew & | |
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" |
0a5681aa KB |
80 | cd /nbsd/usr/src; eval tar ${tflag} ${block} ${tartape} Makefile bin cci \ |
81 | etc games include lib local man old ucb undoc usr.bin usr.lib \ | |
82 | ${remote+'| $remote ${bprog} ">" $tape'} | |
db4af07e | 83 | |
a15338de | 84 | #echo "Add varian fonts" |
0a5681aa KB |
85 | #cd /usr/lib/vfont; eval tar ${tflag} ${block} ${tartape} . \ |
86 | # ${remote+'| $remote ${bprog} ">" $tape'} | |
a15338de KM |
87 | if [ ${type} != '6250' ] |
88 | then | |
89 | echo "Done, rewinding second tape" | |
90 | $remote mt -t ${tape} rew & | |
91 | echo "Mount third tape and hit return when ready" | |
92 | echo "(or type name of next tape drive)" | |
93 | read x | |
94 | if [ "$x" != "" ] | |
95 | then tape=$x | |
96 | fi | |
97 | fi | |
db4af07e MK |
98 | |
99 | : tape3: | |
0a5681aa KB |
100 | echo "Add tar image of system sources" |
101 | cd /nbsd/sys; eval tar ${tflag} ${block} ${tartape} . \ | |
102 | ${remote+'| $remote ${bprog} ">" $tape'} | |
103 | ||
a15338de | 104 | echo "Add user contributed software" |
db4af07e MK |
105 | # standard (always uncompressed) directories: |
106 | new="README Makefile B X ansi apl bib courier cpm dipress dsh \ | |
107 | enet help hyper jove kermit mkmf news notes nntp np100 \ | |
108 | patch pathalias rcs rn spms sunrpc tac tools umodem xns" | |
109 | uncompress="emacs icon mh mmdf sumacc pup" | |
110 | compress="emacs.tar.Z icon.tar.Z mh.tar.Z mmdf.tar.Z sumacc.tar.Z pup.tar.Z" | |
0a5681aa KB |
111 | cd /nbsd/usr/src/new; eval tar ${tflag} ${block} ${tartape} ${new} \ |
112 | ${compress} ${remote+'| $remote ${bprog} ">" $tape'} | |
db4af07e MK |
113 | |
114 | #echo "Add ingres source" | |
0a5681aa KB |
115 | #cd /nbsd/usr/ingres; eval tar ${tflag} ${block} ${tartape} . \ |
116 | # ${remote+'| $remote ${bprog} ">" $tape'} | |
db4af07e | 117 | |
a15338de KM |
118 | echo "Done, rewinding tape" |
119 | $remote mt -t ${tape} rew & |