#!/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. # # %W% (Berkeley) %G% # # maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ] miniroot=dk4a bootroot=dk5a tape=/dev/rmt12 type=1600 if [ $# -gt 0 ]; then type=$1; fi if [ $# -gt 1 ]; then tape=$2; fi tartape=$tape if [ $# -gt 2 ]; then remote=$3; tartape='-'; fi # trap "rm -f /tmp/tape.$$; exit" 0 1 2 3 13 15 $remote mt -t ${tape} rew date umount /dev/dk1a umount /dev/dk4c mount -r /dev/dk1a /nbsd mount -r /dev/dk4c /nbsd/usr cd /nbsd sync echo "Add image of bootstrap file system" eval dd if=/dev/r${bootroot} bs=1024 count=250 conv=sync ${remote+'|'} \ ${remote-"of=$tape"} ${remote+'/usr/local/n20b 1024 ">" $tape'} echo "Add image of mini-root file system" eval dd if=/dev/r${miniroot} count=205 bs=n20b conv=sync ${remote+'|'} \ ${remote-"of=$tape"} ${remote+'/usr/local/n20b ">" $tape'} echo "Add full dump of real file system" /etc/${remote+r}dump 0uf $remote${remote+:}${tape} /nbsd echo "Done, rewinding tape" $remote mt -t ${tape} rew &