1#!/bin/sh - 2# 3# Copyright (c) 1988 Regents of the University of California. 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms are permitted 7# provided that the above copyright notice and this paragraph are 8# duplicated in all such forms and that any documentation, 9# advertising materials, and other materials related to such 10# distribution and use acknowledge that the software was developed 11# by the University of California, Berkeley. The name of the 12# University may not be used to endorse or promote products derived 13# from this software without specific prior written permission. 14# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 15# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 16# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 17# 18# @(#)maketape 5.6 (Berkeley) 04/06/90 19# 20 21# maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ] 22miniroot=dk4a 23bootroot=dk2b 24nbsd=dk1a 25nbsdusr=dk0c 26tape=/dev/rmt20 27type=6250 28block=40 29tflag=cbf 30bprog="/usr/local/20b 20480" 31 32if [ $# -gt 0 ]; then type=$1; fi 33if [ $# -gt 1 ]; then tape=$2; fi 34tartape=$tape 35if [ $# -gt 2 ]; then remote=$3; tartape='-'; fi 36 37$remote mt -t ${tape} rew 38date 39umount /dev/$nbsdusr 40umount /dev/$nbsd 41mount -r /dev/$nbsd /nbsd 42mount -r /dev/$nbsdusr /nbsd/usr 43cd /nbsd 44sync 45 46if [ $type = '1600a' ] 47then 48 type=1600 49fi 50 51echo "Install image of bootstrap file system" 52eval dd if=/dev/r${bootroot} count=750 bs=1024 conv=sync ${remote+"| rsh"} \ 53 ${remote-"of=$tape"} ${remote+'/usr/local/20b 1024 ">" $tape'} 54 55echo "Add image of mini-root file system" 56eval dd if=/dev/r${miniroot} count=205 bs=10240 conv=sync ${remote+"| rsh"} \ 57 ${remote-"of=$tape"} ${remote+'/usr/local/20b ">" $tape'} 58 59echo "Add full dump of real file system" 60/sbin/${remote+r}dump 0uf $remote${remote+:}${tape} /nbsd 61echo "Add tar image of /usr" 62cd /nbsd/usr; eval tar ${tflag} ${block} ${tartape} adm bin dict doc games \ 63 guest hosts include lib local man msgs new \ 64 preserve pub spool tmp ucb \ 65 ${remote+'| $remote ${bprog} ">" $tape'} 66if [ ${type} != '6250' ] 67then 68 echo "Done, rewinding first tape" 69 $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" 80cd /nbsd/usr/src; eval tar ${tflag} ${block} ${tartape} Makefile bin cci \ 81 etc games include lib local man old ucb undoc usr.bin usr.lib \ 82 ${remote+'| $remote ${bprog} ">" $tape'} 83 84#echo "Add varian fonts" 85#cd /usr/lib/vfont; eval tar ${tflag} ${block} ${tartape} . \ 86# ${remote+'| $remote ${bprog} ">" $tape'} 87if [ ${type} != '6250' ] 88then 89 echo "Done, rewinding second tape" 90 $remote mt -t ${tape} rew & 91 echo "Mount third tape and hit return when ready" 92 echo "(or type name of next tape drive)" 93 read x 94 if [ "$x" != "" ] 95 then tape=$x 96 fi 97fi 98 99: tape3: 100echo "Add tar image of system sources" 101cd /nbsd/sys; eval tar ${tflag} ${block} ${tartape} . \ 102 ${remote+'| $remote ${bprog} ">" $tape'} 103 104echo "Add user contributed software" 105# standard (always uncompressed) directories: 106new="README Makefile B X ansi apl bib courier cpm dipress dsh \ 107 enet help hyper jove kermit mkmf news notes nntp np100 \ 108 patch pathalias rcs rn spms sunrpc tac tools umodem xns" 109uncompress="emacs icon mh mmdf sumacc pup" 110compress="emacs.tar.Z icon.tar.Z mh.tar.Z mmdf.tar.Z sumacc.tar.Z pup.tar.Z" 111cd /nbsd/usr/src/new; eval tar ${tflag} ${block} ${tartape} ${new} \ 112 ${compress} ${remote+'| $remote ${bprog} ">" $tape'} 113 114#echo "Add ingres source" 115#cd /nbsd/usr/ingres; eval tar ${tflag} ${block} ${tartape} . \ 116# ${remote+'| $remote ${bprog} ">" $tape'} 117 118echo "Done, rewinding tape" 119$remote mt -t ${tape} rew & 120