| 1 | #! /bin/sh |
| 2 | # @(#)maketape 4.6 %G% |
| 3 | # |
| 4 | miniroot=hp1a |
| 5 | # |
| 6 | trap "rm -f /tmp/tape.$$; exit" 0 1 2 3 13 15 |
| 7 | rewind |
| 8 | date |
| 9 | umount /dev/hp2g /dev/hp2h |
| 10 | umount /dev/hp2a |
| 11 | mount -r /dev/hp2a /nbsd |
| 12 | mount -r /dev/hp2g /nbsd/usr |
| 13 | mount -r /dev/hp2h /nbsd/a |
| 14 | cd /nbsd/tp |
| 15 | tp cmf /tmp/tape.$$ boot copy format |
| 16 | cd /nbsd/sys/mdec |
| 17 | echo "Build 1st level boot block file" |
| 18 | cat tsboot htboot tmboot mtboot noboot noboot noboot /tmp/tape.$$ | \ |
| 19 | dd of=/dev/rmt12 bs=512 conv=sync |
| 20 | cd /nbsd |
| 21 | sync |
| 22 | echo "Add dump of mini-root file system" |
| 23 | dd if=/dev/r${miniroot} of=/dev/rmt12 bs=20b count=205 conv=sync |
| 24 | echo "Add full dump of real file system" |
| 25 | /etc/dump 0uf /dev/rmt12 /nbsd |
| 26 | echo "Add tar image of system sources" |
| 27 | cd /nbsd/a/sys; tar cf /dev/rmt12 . |
| 28 | echo "Add tar image of /usr" |
| 29 | cd /nbsd/usr; tar c adm bill bin dict doc games \ |
| 30 | hosts include ingres lib local man mdec msgs net new \ |
| 31 | preserve pub spool tmp ucb |
| 32 | echo "Done, rewind" |