BSD 4_3_Net_2 release
[unix-history] / usr / src / sys / tahoe / dist / maketape
index dbf481b..448899f 100644 (file)
@@ -1,25 +1,65 @@
-#!/bin/sh
+#!/bin/sh -
 #
 #
-# Copyright (c) 1983 Regents of the University of California.
-# All rights reserved.  The Berkeley software License Agreement
-# specifies the terms and conditions for redistribution.
+# Copyright (c) 1990 The Regents of the University of California.
+# All rights reserved.
 #
 #
-#      @(#)maketape    5.1 (Berkeley) %G%
+# 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.
 #
 #
-#      maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ]
+# 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    5.7 (Berkeley) 7/4/90
+#
+
+# maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ]
 miniroot=dk4a
 miniroot=dk4a
-bootroot=dk5a
+bootroot=dk2b
 nbsd=dk1a
 nbsd=dk1a
-nbsdusr=dk2c
-tape=/dev/rmt12
-type=1600
+nbsdusr=dk0c
+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
 
 
-if [ $# -gt 0 ]; then type=$1; fi
-if [ $# -gt 1 ]; then tape=$2; fi
 tartape=$tape
 tartape=$tape
-if [ $# -gt 2 ]; then remote=$3; tartape='-'; fi
+if [ $# -gt 2 ]; then
+       remote=$3;
+       tartape='-';
+fi
 
 
-$remote mt -t ${tape} rew
+rsh $remote mt -t ${tape} rew
 date
 umount /dev/$nbsdusr
 umount /dev/$nbsd
 date
 umount /dev/$nbsdusr
 umount /dev/$nbsd
@@ -28,23 +68,31 @@ mount -r /dev/$nbsdusr /nbsd/usr
 cd /nbsd
 sync
 
 cd /nbsd
 sync
 
-echo "Add image of bootstrap file system"
-eval dd if=/dev/r${bootroot} count=250 bs=1024 conv=sync \
-       ${remote+'| dd bs=1024'} of=$tape
+if [ $type = '1600a' ]
+then
+       type=1600
+fi
+
+echo "Install image of bootstrap file system"
+eval dd if=/dev/r${bootroot} count=750 bs=1024 conv=sync ${remote+"| rsh"} \
+       ${remote-"of=$tape"} ${remote+'/usr/local/20b 1024 ">" $tape'}
+
 echo "Add image of mini-root file system"
 echo "Add image of mini-root file system"
-eval dd if=/dev/r${miniroot} count=205 bs=20b conv=sync ${remote+'|'} \
+eval dd if=/dev/r${miniroot} count=205 bs=10240 conv=sync ${remote+"| rsh"} \
        ${remote-"of=$tape"} ${remote+'/usr/local/20b ">" $tape'}
        ${remote-"of=$tape"} ${remote+'/usr/local/20b ">" $tape'}
+
 echo "Add full dump of real file system"
 echo "Add full dump of real file system"
-/etc/${remote+r}dump 0uf $remote${remote+:}${tape} /nbsd
+/sbin/${remote+r}dump 0f $remote${remote+:}${tape} /nbsd
+
 echo "Add tar image of /usr"
 echo "Add tar image of /usr"
-cd /nbsd/usr; eval tar cf ${tartape} adm bin dict doc games \
-       guest hosts include lib local man msgs new \
-       preserve pub spool tmp ucb \
-               ${remote+'| $remote /usr/local/20b ">" $tape'}
+cd /nbsd/usr
+tar ${tflag} ${block} ${tartape} bin contrib games include lib libdata \
+       libexec local obj old sbin share | rsh $remote ${bprog} ">" $tape
+
 if [ ${type} != '6250' ]
 then
        echo "Done, rewinding first tape"
 if [ ${type} != '6250' ]
 then
        echo "Done, rewinding first tape"
-       $remote mt -t ${tape} rew &
+       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
        echo "Mount second tape and hit return when ready"
        echo "(or type name of next tape drive)"
        read x
@@ -52,16 +100,17 @@ then
        then    tape=$x
        fi
 fi
        then    tape=$x
        fi
 fi
-echo "Add tar image of system sources"
-cd /nbsd/sys; eval tar cf ${tartape} . \
-       ${remote+'| $remote /usr/local/20b ">" $tape'}
+
+: tape2:
 echo "Add user source code"
 echo "Add user source code"
-cd /nbsd/usr/src; eval tar cf ${tartape} Makefile bin cci etc games \
-       include lib local old ucb undoc usr.bin usr.lib \
-       ${remote+'| $remote /usr/local/20b ">" $tape'}
+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
+
 #echo "Add varian fonts"
 #echo "Add varian fonts"
-#cd /usr/lib/vfont; eval tar cf ${tartape} . \
-#      ${remote+'| $remote /usr/local/20b ">" $tape'}
+#cd /usr/lib/vfont
+#tar ${tflag} ${block} ${tartape} . ${remote+'| $remote ${bprog} ">" $tape'}
 if [ ${type} != '6250' ]
 then
        echo "Done, rewinding second tape"
 if [ ${type} != '6250' ]
 then
        echo "Done, rewinding second tape"
@@ -73,27 +122,22 @@ then
        then    tape=$x
        fi
 fi
        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"
 echo "Add user contributed software"
-if [ ${type} != '6250' ]
-then
-       cd /nbsd/usr/src/new; eval tar cf ${tartape} \
-               README Makefile \
-               B X ansi apl bib courier cpm dipress dsh emacs enet help \
-               hyper icon jove kermit mh mkmf mmdf.tar.Z news notes nntp \
-               np100 patch pathalias rcs rn spms sumacc.tar.Z sunrpc \
-               tac tools umodem xns \
-               ${remote+'| $remote /usr/local/20b ">" $tape'}
-else
-       cd /nbsd/usr/src/new; eval tar cf ${tartape} \
-               README Makefile \
-               B X ansi apl bib courier cpm dipress dsh emacs enet help \
-               hyper icon jove kermit mh mkmf mmdf news notes nntp \
-               np100 patch pathalias rcs rn spms sumacc sunrpc \
-               tac tools umodem xns \
-               ${remote+'| $remote /usr/local/20b ">" $tape'}
-fi
-echo "Add ingres source"
-cd /nbsd/usr/ingres; eval tar cf ${tartape} . \
-       ${remote+'| $remote /usr/local/20b ">" $tape'}
+# 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 "Add ingres source"
+#cd /nbsd/usr/ingres; eval tar ${tflag} ${block} ${tartape} . \
+#      ${remote+'| rsh $remote ${bprog} ">" $tape'}
+
 echo "Done, rewinding tape"
 echo "Done, rewinding tape"
-$remote mt -t ${tape} rew &
+rsh $remote mt -t ${tape} rew &