From: Heiko Z. <smi...@us...> - 2004-05-08 01:54:15
|
Update of /cvsroot/devil-linux/build/config/etc/initrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19897/config/etc/initrd Modified Files: mount_cdrom Log Message: mount media RO when booting from USB stick or other devices like it (Heiko / Tim Tait) Index: mount_cdrom =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/mount_cdrom,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- mount_cdrom 15 Mar 2004 00:49:02 -0000 1.23 +++ mount_cdrom 8 May 2004 01:54:06 -0000 1.24 @@ -26,6 +26,12 @@ CDROM_SCSI=`find /dev/scsi/ -name "cd*" 2> /dev/null` CDROMS="$CDROM_IDE $CDROM_SCSI" +if [ "$3" != "silent" ]; then + $GREEN + echo "Search list: $CDROMS" + $NORMAL +fi + for disk in $CDROMS do echo checking $disk @@ -78,13 +84,20 @@ $NORMAL fi if [ -e /mnt/bootcd.iso ] ; then + # since this could be flash disk, lets make read-only. + # Should not write to this mount anymore anyway. It + # is attempted to umount it in pre_init but will fail + # because bootcd.iso is still mounted inside it. + # RO will make it less painfull. + mount -o remount,ro,noatime $disk 2> /dev/null mount -o loop -t iso9660 /mnt/bootcd.iso $1 || return 1 echo $disk > /shm/DL_DEVICE + dl_version=`cat /mnt/DEVIL-LINUX 2> /dev/null` if [ "$3" != "silent" ]; then $YELLOW - echo -e "\nFound ISO on $disk" + echo -e "\nFound ISO ($dl_version) on $disk" $NORMAL - fi + fi exit 0 fi else |