1*53211Sralph#!/bin/sh - 2*53211Sralph# 3*53211Sralph# Copyright (c) 1992 The Regents of the University of California. 4*53211Sralph# All rights reserved. 5*53211Sralph# 6*53211Sralph# %sccs.include.redist.sh% 7*53211Sralph# 8*53211Sralph# @(#)maketape 7.1 (Berkeley) 04/20/92 9*53211Sralph# 10*53211Sralph 11*53211Sralph# maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ] 12*53211Sralphminiroot=ra1b 13*53211Sralphnbsd=ra1a 14*53211Sralphnbsdusr=/mnt/usr/DISTUSR 15*53211Sralphtape=/dev/rmt20 16*53211Sralphtype=6250 17*53211Sralphblock=40 18*53211Sralphtflag=cbf 19*53211Sralphbprog="/usr/local/20b 20480" 20*53211Sralph 21*53211Sralphif [ $# -gt 0 ]; then 22*53211Sralph type=$1; 23*53211Sralphfi 24*53211Sralph 25*53211Sralphif [ $# -gt 1 ]; then 26*53211Sralph tape=$2; 27*53211Sralphfi 28*53211Sralph 29*53211Sralphtartape=$tape 30*53211Sralphif [ $# -gt 2 ]; then 31*53211Sralph remote=$3; 32*53211Sralph tartape='-'; 33*53211Sralphfi 34*53211Sralph 35*53211Sralphrsh $remote mt -t ${tape} rew 36*53211Sralphdate 37*53211Sralph#umount /dev/$nbsdusr 38*53211Sralphumount /dev/$nbsd 39*53211Sralphmount -r /dev/$nbsd /nbsd 40*53211Sralph#mount -r /dev/$nbsdusr /nbsd/usr 41*53211Sralphcd /nbsd 42*53211Sralphsync 43*53211Sralph 44*53211Sralphif [ $type = '1600a' ] 45*53211Sralphthen 46*53211Sralph type=1600 47*53211Sralphfi 48*53211Sralph 49*53211Sralphcd /nbsd/sys/vaxdist/tp 50*53211Sralphtp cmf /tmp/tape.$$ boot copy format 51*53211Sralphcd /nbsd/sys/mdec 52*53211Sralphecho "Build 1st level boot block file" 53*53211Sralphcat tsboot htboot tmboot mtboot utboot noboot noboot /tmp/tape.$$ | \ 54*53211Sralph rsh $remote dd of=${tape} obs=512 conv=sync 55*53211Sralph 56*53211Sralphecho "Add image of mini-root file system" 57*53211Sralpheval dd if=/dev/r${miniroot} count=205 bs=20b conv=sync ${remote+"| rsh"} \ 58*53211Sralph ${remote-"of=$tape"} ${remote+'/usr/local/20b ">" $tape'} 59*53211Sralph 60*53211Sralphecho "Add full dump of real file system" 61*53211Sralph/sbin/${remote+r}dump 0f $remote${remote+:}${tape} /dev/r${nbsd} 62*53211Sralph 63*53211Sralphecho "Add tar image of /usr" 64*53211Sralphcd ${nbsdusr} 65*53211Sralphtar ${tflag} ${block} ${tartape} bin contrib games include lib libdata \ 66*53211Sralph libexec local mdec obj old sbin share | rsh $remote ${bprog} ">" $tape 67*53211Sralph 68*53211Sralphif [ ${type} != '6250' ] 69*53211Sralphthen 70*53211Sralph echo "Done, rewinding first tape" 71*53211Sralph rsh $remote mt -t ${tape} rew & 72*53211Sralph echo "Mount second tape and hit return when ready" 73*53211Sralph echo "(or type name of next tape drive)" 74*53211Sralph read x 75*53211Sralph if [ "$x" != "" ] 76*53211Sralph then tape=$x 77*53211Sralph fi 78*53211Sralphfi 79*53211Sralph 80*53211Sralph: tape2: 81*53211Sralphecho "Add user source code" 82*53211SralphFILES="Makefile bin etc games include kerberosIV lib libexec old \ 83*53211Sralph pgrm sbin share usr.bin usr.sbin" 84*53211Sralphcd /nbsd/usr/src 85*53211Sralphtar ${tflag} ${block} ${tartape} ${FILES} | rsh $remote ${bprog} ">" $tape 86*53211Sralph 87*53211Sralphif [ ${type} != '6250' ] 88*53211Sralphthen 89*53211Sralph echo "Done, rewinding second tape" 90*53211Sralph $remote mt -t ${tape} rew & 91*53211Sralph echo "Mount third tape and hit return when ready" 92*53211Sralph echo "(or type name of next tape drive)" 93*53211Sralph read x 94*53211Sralph if [ "$x" != "" ] 95*53211Sralph then tape=$x 96*53211Sralph fi 97*53211Sralphfi 98*53211Sralph 99*53211Sralph: tape3: 100*53211Sralphecho "Add tar image of system sources" 101*53211Sralphcd /nbsd/usr/src/sys 102*53211Sralphtar ${tflag} ${block} ${tartape} . | rsh $remote ${bprog} ">" $tape 103*53211Sralph 104*53211Sralphecho "Add user contributed software" 105*53211Sralph# standard (always uncompressed) directories: 106*53211SralphFILES="Makefile Makefile.inc ansi bib emacs emacs-18.55.tar.Z jove kermit \ 107*53211Sralph mh.tar.Z patch rcs vmsprep" 108*53211Sralphcd /nbsd/usr/src/contrib 109*53211Sralphtar ${tflag} ${block} ${tartape} ${FILES} | rsh $remote ${bprog} ">" $tape 110*53211Sralph 111*53211Sralph 112*53211Sralphecho "Done, rewinding tape" 113*53211Sralphrsh $remote mt -t ${tape} rew & 114