Update of /cvsroot/devil-linux/build/config/etc/initrd
In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv18576
Modified Files:
mount_cdrom
Log Message:
-- fixed image mounting in case of config file absence
Index: mount_cdrom
===================================================================
RCS file: /cvsroot/devil-linux/build/config/etc/initrd/mount_cdrom,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- mount_cdrom 24 Jul 2007 08:04:47 -0000 1.41
+++ mount_cdrom 29 Aug 2007 06:55:37 -0000 1.42
@@ -243,8 +243,8 @@
fi
# generate list of cdroms from devfs
-DEVICES_IDE=`find /dev -name "hd*" 2> /dev/null`
-CDROM_SCSI=`find /dev -name "sr*" 2> /dev/null`
+DEVICES_IDE=`find /dev -name "hd?" 2> /dev/null`
+CDROM_SCSI=`find /dev -name "sr?" 2> /dev/null`
CDROMS="$DEVICES_IDE $CDROM_SCSI"
DEVICE_USER=`awk -v RS=' ' -v FS='=' '/^DL_device=/ { print $2 }' /proc/cmdline`
@@ -293,8 +293,8 @@
done
# ok let's check all partitions if we find the bootcd.iso & the file DEVIL-LINUX
-DEVICES_IDE=`find /dev -name "hd*" 2> /dev/null`
-DISCS_SCSI=`find /dev -name "sd*" 2> /dev/null`
+DEVICES_IDE=`find /dev -name "hd??" 2> /dev/null`
+DISCS_SCSI=`find /dev -name "sd??" 2> /dev/null`
DISCS="$DEVICES_IDE $DISCS_SCSI"
if [ "$DEVICE_USER_ONLY" != "0" ]; then
@@ -307,6 +307,7 @@
for disk in $DISCS
do
echo -n " checking $disk ... "
+ umount /cd 2> /dev/null
if /sbin/mount -n -t auto -o rw,noatime $disk /cd 2> /dev/null; then
if [ -e /cd/DEVIL-LINUX ] ; then
$GREEN
|