xref: /original-bsd/sys/tahoe/dist/maketape (revision ee109830)
1#!/bin/sh -
2#
3# Copyright (c) 1990 The Regents of the University of California.
4# All rights reserved.
5#
6# %sccs.include.redist.sh%
7#
8#	@(#)maketape	5.7 (Berkeley) 07/04/90
9#
10
11# maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ]
12miniroot=dk4a
13bootroot=dk2b
14nbsd=dk1a
15nbsdusr=dk0c
16tape=/dev/rmt20
17type=6250
18block=40
19tflag=cbf
20bprog="/usr/local/20b 20480"
21
22if [ $# -gt 0 ]; then
23	type=$1;
24fi
25
26if [ $# -gt 1 ]; then
27	tape=$2;
28fi
29
30tartape=$tape
31if [ $# -gt 2 ]; then
32	remote=$3;
33	tartape='-';
34fi
35
36rsh $remote mt -t ${tape} rew
37date
38umount /dev/$nbsdusr
39umount /dev/$nbsd
40mount -r /dev/$nbsd /nbsd
41mount -r /dev/$nbsdusr /nbsd/usr
42cd /nbsd
43sync
44
45if [ $type = '1600a' ]
46then
47	type=1600
48fi
49
50echo "Install image of bootstrap file system"
51eval dd if=/dev/r${bootroot} count=750 bs=1024 conv=sync ${remote+"| rsh"} \
52	${remote-"of=$tape"} ${remote+'/usr/local/20b 1024 ">" $tape'}
53
54echo "Add image of mini-root file system"
55eval dd if=/dev/r${miniroot} count=205 bs=10240 conv=sync ${remote+"| rsh"} \
56	${remote-"of=$tape"} ${remote+'/usr/local/20b ">" $tape'}
57
58echo "Add full dump of real file system"
59/sbin/${remote+r}dump 0f $remote${remote+:}${tape} /nbsd
60
61echo "Add tar image of /usr"
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
66if [ ${type} != '6250' ]
67then
68	echo "Done, rewinding first tape"
69	rsh $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
76fi
77
78: tape2:
79echo "Add user source code"
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
84
85#echo "Add varian fonts"
86#cd /usr/lib/vfont
87#tar ${tflag} ${block} ${tartape} . ${remote+'| $remote ${bprog} ">" $tape'}
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
99
100: tape3:
101echo "Add tar image of system sources"
102cd /nbsd/usr/src/sys
103tar ${tflag} ${block} ${tartape} . | rsh $remote ${bprog} ">" $tape
104
105echo "Add user contributed software"
106# standard (always uncompressed) directories:
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
111
112#echo "Add ingres source"
113#cd /nbsd/usr/ingres; eval tar ${tflag} ${block} ${tartape} . \
114#	${remote+'| rsh $remote ${bprog} ">" $tape'}
115
116echo "Done, rewinding tape"
117rsh $remote mt -t ${tape} rew &
118