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