need pocs, too; hcx-9 stuff was missing, add on HCX9 variable
[unix-history] / usr / src / sys / tahoe / dist / maketape
CommitLineData
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 12miniroot=dk4a
0a5681aa 13bootroot=dk2b
a15338de 14nbsd=dk1a
ac7c2b9d 15nbsdusr=dk0c
db4af07e
MK
16tape=/dev/rmt20
17type=6250
0a5681aa
KB
18block=40
19tflag=cbf
20bprog="/usr/local/20b 20480"
a15338de 21
2f3b6349
KB
22if [ $# -gt 0 ]; then
23 type=$1;
24fi
25
26if [ $# -gt 1 ]; then
27 tape=$2;
28fi
29
a15338de 30tartape=$tape
2f3b6349
KB
31if [ $# -gt 2 ]; then
32 remote=$3;
33 tartape='-';
34fi
a15338de 35
2f3b6349 36rsh $remote mt -t ${tape} rew
a15338de
KM
37date
38umount /dev/$nbsdusr
39umount /dev/$nbsd
40mount -r /dev/$nbsd /nbsd
41mount -r /dev/$nbsdusr /nbsd/usr
42cd /nbsd
43sync
44
db4af07e
MK
45if [ $type = '1600a' ]
46then
47 type=1600
48fi
49
ac7c2b9d
KB
50echo "Install image of bootstrap file system"
51eval 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 54echo "Add image of mini-root file system"
0a5681aa 55eval 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 58echo "Add full dump of real file system"
2f3b6349
KB
59/sbin/${remote+r}dump 0f $remote${remote+:}${tape} /nbsd
60
a15338de 61echo "Add tar image of /usr"
2f3b6349
KB
62cd /nbsd/usr
63tar ${tflag} ${block} ${tartape} bin contrib games include lib libdata \
64 libexec local obj old sbin share | rsh $remote ${bprog} ">" $tape
65
a15338de
KM
66if [ ${type} != '6250' ]
67then
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
76fi
db4af07e
MK
77
78: tape2:
a15338de 79echo "Add user source code"
2f3b6349
KB
80FILES="Makefile bin etc games include kerberosIV lib libexec old \
81 pgrm sbin share usr.bin usr.sbin"
82cd /nbsd/usr/src
83tar ${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
88if [ ${type} != '6250' ]
89then
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
98fi
db4af07e
MK
99
100: tape3:
0a5681aa 101echo "Add tar image of system sources"
2f3b6349
KB
102cd /nbsd/usr/src/sys
103tar ${tflag} ${block} ${tartape} . | rsh $remote ${bprog} ">" $tape
0a5681aa 104
a15338de 105echo "Add user contributed software"
db4af07e 106# standard (always uncompressed) directories:
2f3b6349
KB
107FILES="Makefile Makefile.inc ansi bib emacs emacs-18.55.tar.Z jove kermit \
108 mh.tar.Z patch rcs vmsprep"
109cd /nbsd/usr/src/contrib
110tar ${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 116echo "Done, rewinding tape"
2f3b6349 117rsh $remote mt -t ${tape} rew &