1#!/bin/sh 2# 3# Copyright (c) 1983 Regents of the University of California. 4# All rights reserved. The Berkeley software License Agreement 5# specifies the terms and conditions for redistribution. 6# 7# @(#)maketape 5.2 (Berkeley) 04/02/87 8# 9# maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ] 10miniroot=dk4a 11bootroot=dk5a 12nbsd=dk1a 13nbsdusr=dk2c 14tape=/dev/rmt12 15type=1600 16 17if [ $# -gt 0 ]; then type=$1; fi 18if [ $# -gt 1 ]; then tape=$2; fi 19tartape=$tape 20if [ $# -gt 2 ]; then remote=$3; tartape='-'; fi 21 22$remote mt -t ${tape} rew 23date 24umount /dev/$nbsdusr 25umount /dev/$nbsd 26mount -r /dev/$nbsd /nbsd 27mount -r /dev/$nbsdusr /nbsd/usr 28cd /nbsd 29sync 30 31echo "Add image of bootstrap file system" 32eval dd if=/dev/r${bootroot} count=250 bs=1024 conv=sync \ 33 ${remote+'| rsh $remote dd bs=1024'} of=$tape 34echo "Add image of mini-root file system" 35eval dd if=/dev/r${miniroot} count=205 bs=20b conv=sync ${remote+'| rsh'} \ 36 ${remote-"of=$tape"} ${remote+'/usr/local/20b ">" $tape'} 37echo "Add full dump of real file system" 38/etc/${remote+r}dump 0uf $remote${remote+:}${tape} /nbsd 39echo "Add tar image of /usr" 40cd /nbsd/usr; eval tar cf ${tartape} adm bin dict doc games \ 41 guest hosts include lib local man msgs new \ 42 preserve pub spool tmp ucb \ 43 ${remote+'| $remote /usr/local/20b ">" $tape'} 44if [ ${type} != '6250' ] 45then 46 echo "Done, rewinding first tape" 47 $remote mt -t ${tape} rew & 48 echo "Mount second tape and hit return when ready" 49 echo "(or type name of next tape drive)" 50 read x 51 if [ "$x" != "" ] 52 then tape=$x 53 fi 54fi 55echo "Add tar image of system sources" 56cd /nbsd/sys; eval tar cf ${tartape} . \ 57 ${remote+'| $remote /usr/local/20b ">" $tape'} 58echo "Add user source code" 59cd /nbsd/usr/src; eval tar cf ${tartape} Makefile bin cci etc games \ 60 include lib local old ucb undoc usr.bin usr.lib \ 61 ${remote+'| $remote /usr/local/20b ">" $tape'} 62#echo "Add varian fonts" 63#cd /usr/lib/vfont; eval tar cf ${tartape} . \ 64# ${remote+'| $remote /usr/local/20b ">" $tape'} 65if [ ${type} != '6250' ] 66then 67 echo "Done, rewinding second tape" 68 $remote mt -t ${tape} rew & 69 echo "Mount third tape and hit return when ready" 70 echo "(or type name of next tape drive)" 71 read x 72 if [ "$x" != "" ] 73 then tape=$x 74 fi 75fi 76echo "Add user contributed software" 77if [ ${type} != '6250' ] 78then 79 cd /nbsd/usr/src/new; eval tar cf ${tartape} \ 80 README Makefile \ 81 B X ansi apl bib courier cpm dipress dsh emacs enet help \ 82 hyper icon jove kermit mh mkmf mmdf.tar.Z news notes nntp \ 83 np100 patch pathalias rcs rn spms sumacc.tar.Z sunrpc \ 84 tac tools umodem xns \ 85 ${remote+'| $remote /usr/local/20b ">" $tape'} 86else 87 cd /nbsd/usr/src/new; eval tar cf ${tartape} \ 88 README Makefile \ 89 B X ansi apl bib courier cpm dipress dsh emacs enet help \ 90 hyper icon jove kermit mh mkmf mmdf news notes nntp \ 91 np100 patch pathalias rcs rn spms sumacc sunrpc \ 92 tac tools umodem xns \ 93 ${remote+'| $remote /usr/local/20b ">" $tape'} 94fi 95echo "Add ingres source" 96cd /nbsd/usr/ingres; eval tar cf ${tartape} . \ 97 ${remote+'| $remote /usr/local/20b ">" $tape'} 98echo "Done, rewinding tape" 99$remote mt -t ${tape} rew & 100