|
|
1.1 root 1: #!/bin/sh -
2: #
3: # Copyright (c) 1990 The Regents of the University of California.
4: # All rights reserved.
5: #
6: # Redistribution and use in source and binary forms, with or without
7: # modification, are permitted provided that the following conditions
8: # are met:
9: # 1. Redistributions of source code must retain the above copyright
10: # notice, this list of conditions and the following disclaimer.
11: # 2. Redistributions in binary form must reproduce the above copyright
12: # notice, this list of conditions and the following disclaimer in the
13: # documentation and/or other materials provided with the distribution.
14: # 3. All advertising materials mentioning features or use of this software
15: # must display the following acknowledgement:
16: # This product includes software developed by the University of
17: # California, Berkeley and its contributors.
18: # 4. Neither the name of the University nor the names of its contributors
19: # may be used to endorse or promote products derived from this software
20: # without specific prior written permission.
21: #
22: # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23: # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24: # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25: # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26: # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27: # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28: # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29: # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30: # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31: # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32: # SUCH DAMAGE.
33: #
34: # @(#)maketape 4.33 (Berkeley) 7/5/90
35: #
36:
37: # maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ]
38: miniroot=ra1b
39: nbsd=ra1a
40: nbsdusr=/mnt/usr/DISTUSR
41: tape=/dev/rmt20
42: type=6250
43: block=40
44: tflag=cbf
45: bprog="/usr/local/20b 20480"
46:
47: if [ $# -gt 0 ]; then
48: type=$1;
49: fi
50:
51: if [ $# -gt 1 ]; then
52: tape=$2;
53: fi
54:
55: tartape=$tape
56: if [ $# -gt 2 ]; then
57: remote=$3;
58: tartape='-';
59: fi
60:
61: rsh $remote mt -t ${tape} rew
62: date
63: #umount /dev/$nbsdusr
64: umount /dev/$nbsd
65: mount -r /dev/$nbsd /nbsd
66: #mount -r /dev/$nbsdusr /nbsd/usr
67: cd /nbsd
68: sync
69:
70: if [ $type = '1600a' ]
71: then
72: type=1600
73: fi
74:
75: cd /nbsd/sys/vaxdist/tp
76: tp cmf /tmp/tape.$$ boot copy format
77: cd /nbsd/sys/mdec
78: echo "Build 1st level boot block file"
79: cat tsboot htboot tmboot mtboot utboot noboot noboot /tmp/tape.$$ | \
80: rsh $remote dd of=${tape} obs=512 conv=sync
81:
82: echo "Add image of mini-root file system"
83: eval dd if=/dev/r${miniroot} count=205 bs=20b conv=sync ${remote+"| rsh"} \
84: ${remote-"of=$tape"} ${remote+'/usr/local/20b ">" $tape'}
85:
86: echo "Add full dump of real file system"
87: /sbin/${remote+r}dump 0f $remote${remote+:}${tape} /dev/r${nbsd}
88:
89: echo "Add tar image of /usr"
90: cd ${nbsdusr}
91: tar ${tflag} ${block} ${tartape} bin contrib games include lib libdata \
92: libexec local mdec obj old sbin share | rsh $remote ${bprog} ">" $tape
93:
94: if [ ${type} != '6250' ]
95: then
96: echo "Done, rewinding first tape"
97: rsh $remote mt -t ${tape} rew &
98: echo "Mount second tape and hit return when ready"
99: echo "(or type name of next tape drive)"
100: read x
101: if [ "$x" != "" ]
102: then tape=$x
103: fi
104: fi
105:
106: : tape2:
107: echo "Add user source code"
108: FILES="Makefile bin etc games include kerberosIV lib libexec old \
109: pgrm sbin share usr.bin usr.sbin"
110: cd /nbsd/usr/src
111: tar ${tflag} ${block} ${tartape} ${FILES} | rsh $remote ${bprog} ">" $tape
112:
113: if [ ${type} != '6250' ]
114: then
115: echo "Done, rewinding second tape"
116: $remote mt -t ${tape} rew &
117: echo "Mount third tape and hit return when ready"
118: echo "(or type name of next tape drive)"
119: read x
120: if [ "$x" != "" ]
121: then tape=$x
122: fi
123: fi
124:
125: : tape3:
126: echo "Add tar image of system sources"
127: cd /nbsd/usr/src/sys
128: tar ${tflag} ${block} ${tartape} . | rsh $remote ${bprog} ">" $tape
129:
130: echo "Add user contributed software"
131: # standard (always uncompressed) directories:
132: FILES="Makefile Makefile.inc ansi bib emacs emacs-18.55.tar.Z jove kermit \
133: mh.tar.Z patch rcs vmsprep"
134: cd /nbsd/usr/src/contrib
135: tar ${tflag} ${block} ${tartape} ${FILES} | rsh $remote ${bprog} ">" $tape
136:
137:
138: echo "Done, rewinding tape"
139: rsh $remote mt -t ${tape} rew &
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.