#!/bin/sh - # # Copyright (c) 1988 Regents of the University of California. # All rights reserved. # # Redistribution and use in source and binary forms are permitted # provided that the above copyright notice and this paragraph are # duplicated in all such forms and that any documentation, # advertising materials, and other materials related to such # distribution and use acknowledge that the software was developed # by the University of California, Berkeley. The name of the # University may not be used to endorse or promote products derived # from this software without specific prior written permission. # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # # @(#)maketape 5.5 (Berkeley) %G% # # maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ] miniroot=dk4a bootroot=dk2b nbsd=dk1a nbsdusr=dk2c 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 $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 echo "Add image of bootstrap file system" eval dd if=/dev/r${bootroot} count=600 bs=1024 conv=sync ${remote+"| rsh"} \ ${remote-"of=$tape"} ${remote+'/usr/local/20b 1024 ">" $tape'} echo "Add image of mini-root file system" eval dd if=/dev/r${miniroot} count=205 bs=10240 conv=sync ${remote+"| rsh"} \ ${remote-"of=$tape"} ${remote+'/usr/local/20b ">" $tape'} echo "Add full dump of real file system" /etc/${remote+r}dump 0uf $remote${remote+:}${tape} /nbsd echo "Add tar image of /usr" cd /nbsd/usr; eval tar ${tflag} ${block} ${tartape} adm bin dict doc games \ guest hosts include lib local man msgs new \ preserve pub spool tmp ucb \ ${remote+'| $remote ${bprog} ">" $tape'} if [ ${type} != '6250' ] then echo "Done, rewinding first tape" $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" cd /nbsd/usr/src; eval tar ${tflag} ${block} ${tartape} Makefile bin cci \ etc games include lib local man old ucb undoc usr.bin usr.lib \ ${remote+'| $remote ${bprog} ">" $tape'} #echo "Add varian fonts" #cd /usr/lib/vfont; eval tar ${tflag} ${block} ${tartape} . \ # ${remote+'| $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/sys; eval tar ${tflag} ${block} ${tartape} . \ ${remote+'| $remote ${bprog} ">" $tape'} echo "Add user contributed software" # standard (always uncompressed) directories: new="README Makefile B X ansi apl bib courier cpm dipress dsh \ enet help hyper jove kermit mkmf news notes nntp np100 \ patch pathalias rcs rn spms sunrpc tac tools umodem xns" uncompress="emacs icon mh mmdf sumacc pup" compress="emacs.tar.Z icon.tar.Z mh.tar.Z mmdf.tar.Z sumacc.tar.Z pup.tar.Z" cd /nbsd/usr/src/new; eval tar ${tflag} ${block} ${tartape} ${new} \ ${compress} ${remote+'| $remote ${bprog} ">" $tape'} #echo "Add ingres source" #cd /nbsd/usr/ingres; eval tar ${tflag} ${block} ${tartape} . \ # ${remote+'| $remote ${bprog} ">" $tape'} echo "Done, rewinding tape" $remote mt -t ${tape} rew &