Fix so that unit number 1 is found again.
[unix-history] / etc / etc.i386 / kc.profile
CommitLineData
10a2c021
RG
1# $Header
2#
3# rc for kernel distribution floppy
4
5PATH=/bin:/sbin
6export PATH
7
8#test=echo
9
10reboot_it() {
11 echo ""
12 echo "halting the machine..."
13
14 ${test} halt
15}
16
17bail_out() {
18 echo ""
19 echo "Time to reboot the machine!"
20 echo "Once the machine has halted (it'll tell you when),"
21 echo "remove the floppy from the disk drive and press"
22 echo "any key to reboot."
23 reboot_it
24}
25
26echo enter '"copy"' at the prompt to copy the kernel on this
27echo floppy to your hard disk. enter anything else to reboot,
28echo but wait for the machine to restart to remove the floppy.
29echo ""
30echo -n "> "
31
32read todo
33
34if [ "$todo"X = copyX ]; then
35 echo ""
36 echo "what disk partition should the kernel be installed on?"
37 echo "(e.g. "wd0a", "sd0a", etc.)"
38 echo ""
39 echo -n "> "
40
41 read diskpart
42
43 echo ""
44 echo "checking the filesystem on $diskpart..."
45
46 ${test} fsck -y /dev/r$diskpart
47 if [ $? -ne 0 ]; then
48 echo ""
49 echo "fsck failed... sorry, can't copy kernel..."
50 bail_out
51 fi
52
53 echo ""
54 echo "mounting $diskpart on /mnt..."
55
56 ${test} mount /dev/$diskpart /mnt
57 if [ $? -ne 0 ]; then
58 echo ""
59 echo "mount failed... sorry, can't copy kernel..."
60 bail_out
61 fi
62
63 echo ""
64 echo "copying kernel..."
65
881d5e66 66 ${test} cp /386bsd /mnt/386bsd
10a2c021
RG
67 if [ $? -ne 0 ]; then
68 echo ""
69 echo "copy failed... (?!?!?!)"
70 bail_out
71 fi
72
73 echo ""
74 echo "unmounting $diskpart..."
75
76 ${test} umount /mnt > /dev/null 2>&1
77 if [ $? -ne 0 ]; then
78 echo ""
79 echo "unmount failed... shouldn't be a problem..."
80 fi
81
82 bail_out
83fi
84
85reboot_it