From: <smi...@us...> - 2003-11-09 17:17:09
|
Update of /cvsroot/devil-linux/build/config/etc/initrd In directory sc8-pr-cvs1:/tmp/cvs-serv20794/config/etc/initrd Modified Files: linuxrc Log Message: dont' try to copy etc.tar.bz onto a CD be a little more "talkative" during initrd Index: linuxrc =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/linuxrc,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- linuxrc 9 Nov 2003 16:04:45 -0000 1.46 +++ linuxrc 9 Nov 2003 17:17:04 -0000 1.47 @@ -60,7 +60,7 @@ # create the floppy drives, somehow devfs doesn't do it in initrd mknod /dev/fd0 b 2 0 -mknod /dev/fd1 b 2 0 +mknod /dev/fd1 b 2 1 # mount shared memory filesystem with a limit of 40GB (for now) echo "Mounting SHM FS on /shm" @@ -81,12 +81,13 @@ DL_CONFIG_SOURCE="" $SUCCESS -echo "searching for configuration media" +echo -e "searching for configuration media" $NORMAL until [ -e /floppy/etc.tar.bz2 ] ; do for CFG_SRC in $CONFIG_SRC_LIST do + echo -e "Checking $CFG_SRC" if mount -n -t auto $CFG_SRC /floppy >/dev/null 2>&1 ; then if [ -e /floppy/etc.tar.bz2 ] ; then @@ -96,27 +97,30 @@ DL_CONFIG_SOURCE=$CFG_SRC continue 2 else - beep; - umount /floppy # in case user swaps floppy when we are accepting input - $SUCCESS - echo -e "\n*** Found empty configuration media. ***\n" - $NORMAL - echo -n "Should I copy default configuration to it?" - if ask_yes_no ; then - echo -n "Would you like to probe for SCSI controllers now?" + # offer to copy the configuration file if device is not a CD + if [ ! "${CFG_SRC##/*/}" = "cd" ];then + beep; + umount /floppy # in case user swaps floppy when we are accepting input + $SUCCESS + echo -e "\n*** Found empty configuration media. ***" + $NORMAL + echo -n "Should I copy default configuration to it?" if ask_yes_no ; then - /probe_all_scsi_modules - fi - if ! /mount_cdrom /cdrom noreboot ; then - $FAILURE - echo "Cannot find CD drive - try probing for SCSI controllers" - $NORMAL - continue + echo -n "Would you like to probe for SCSI controllers now?" + if ask_yes_no ; then + /probe_all_scsi_modules + fi + if ! /mount_cdrom /cdrom noreboot ; then + $FAILURE + echo "Cannot find CD drive - try probing for SCSI controllers" + $NORMAL + continue + fi + mount -n -t auto $CFG_SRC /floppy >/dev/null 2>&1 || continue + cp -i /cdrom/config/etc.tar.bz2 /floppy/ || continue + DL_CONFIG_SOURCE=$CFG_SRC + continue 2 fi - mount -n -t auto $CFG_SRC /floppy >/dev/null 2>&1 || continue - cp -i /cdrom/config/etc.tar.bz2 /floppy/ || continue - DL_CONFIG_SOURCE=$CFG_SRC - continue 2 fi fi fi |