1993-08-10 14:20:12 +02:00
|
|
|
# $Header
|
|
|
|
#
|
|
|
|
# rc for kernel distribution floppy
|
|
|
|
|
|
|
|
PATH=/bin:/sbin
|
|
|
|
export PATH
|
|
|
|
|
|
|
|
#test=echo
|
|
|
|
|
|
|
|
reboot_it() {
|
|
|
|
echo ""
|
|
|
|
echo "halting the machine..."
|
|
|
|
|
|
|
|
${test} halt
|
|
|
|
}
|
|
|
|
|
|
|
|
bail_out() {
|
|
|
|
echo ""
|
|
|
|
echo "Time to reboot the machine!"
|
|
|
|
echo "Once the machine has halted (it'll tell you when),"
|
|
|
|
echo "remove the floppy from the disk drive and press"
|
|
|
|
echo "any key to reboot."
|
|
|
|
reboot_it
|
|
|
|
}
|
|
|
|
|
|
|
|
echo enter '"copy"' at the prompt to copy the kernel on this
|
|
|
|
echo floppy to your hard disk. enter anything else to reboot,
|
|
|
|
echo but wait for the machine to restart to remove the floppy.
|
|
|
|
echo ""
|
1993-08-24 21:55:16 +02:00
|
|
|
echo -n "kc> "
|
1993-08-10 14:20:12 +02:00
|
|
|
|
|
|
|
read todo
|
|
|
|
|
|
|
|
if [ "$todo"X = copyX ]; then
|
|
|
|
echo ""
|
|
|
|
echo "what disk partition should the kernel be installed on?"
|
|
|
|
echo "(e.g. "wd0a", "sd0a", etc.)"
|
|
|
|
echo ""
|
1993-08-24 21:55:16 +02:00
|
|
|
echo -n "copy kernel to> "
|
1993-08-10 14:20:12 +02:00
|
|
|
|
|
|
|
read diskpart
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "checking the filesystem on $diskpart..."
|
|
|
|
|
|
|
|
${test} fsck -y /dev/r$diskpart
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo ""
|
|
|
|
echo "fsck failed... sorry, can't copy kernel..."
|
|
|
|
bail_out
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "mounting $diskpart on /mnt..."
|
|
|
|
|
|
|
|
${test} mount /dev/$diskpart /mnt
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo ""
|
|
|
|
echo "mount failed... sorry, can't copy kernel..."
|
|
|
|
bail_out
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "copying kernel..."
|
|
|
|
|
1993-08-10 16:16:33 +02:00
|
|
|
${test} cp /386bsd /mnt/386bsd
|
1993-08-10 14:20:12 +02:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo ""
|
|
|
|
echo "copy failed... (?!?!?!)"
|
|
|
|
bail_out
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "unmounting $diskpart..."
|
|
|
|
|
|
|
|
${test} umount /mnt > /dev/null 2>&1
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo ""
|
|
|
|
echo "unmount failed... shouldn't be a problem..."
|
|
|
|
fi
|
|
|
|
|
|
|
|
bail_out
|
|
|
|
fi
|
|
|
|
|
|
|
|
reboot_it
|