#---------------------------------------------------------------------------- # /etc/boot.d/rc100.floppy # # Creation: 2004-06-26 # Last Update: $Id$ #---------------------------------------------------------------------------- mount_floppy () { sects_1680_flop=`echo -e -n '\x20\x0D'` fdflush $flop_dev sects_boot_flop=`dd if="$flop_dev" bs=1 skip=19 count=2 2>/dev/null` if [ "$sects_boot_flop" = "$sects_1680_flop" ] then flop_dev="$flop_dev"u1680 fi mount -r $flop_dev $flop_dir -t $boot_fs } if [ ! "$boot" ] then begin_script BOOT "mounting boot device and unpacking opt archive" boot_fs=vfat flop_dir=/boot flop_dev=/dev/fd0 if ! mount_floppy then stop "can't mount boot-floppy, check drivers" fi boot_dev="$flop_dev" cp $flop_dir/$rcfile /var/run if [ $BOOT_TYPE = "fdx2" ] then # two floppies if [ -f $flop_dir/$opt_archive ] then cp $flop_dir/$opt_archive /$opt_archive fi umount $flop_dir echo log_info cy "=======================================================" log_info cy " Remove BOOT-floppy, insert OPT-floppy and press Enter " log_info cy "=======================================================" for i in 1 2 3 do do_beep sleep 1 done read _a flop_dev=/dev/fd0 if ! mount_floppy then stop "can't mount boot-floppy, check drivers" fi boot_dev="$flop_dev" if [ -f /$opt_archive ] then /bin/cat /$opt_archive /boot/$opt_archive \ | extract_opt "" "$unzip_method" "you seem to be out of ram" rm /$opt_archive else extract_opt $flop_dir/$opt_archive "$unzip_method" "you seem to be out of ram" fi else extract_opt $flop_dir/$opt_archive "$unzip_method" "you seem to be out of ram" fi end_script fi