From: Heiko Z. <smi...@us...> - 2011-12-21 01:03:36
|
Update of /cvsroot/devil-linux/build/config/etc/initrd In directory vz-cvs-3.sog:/tmp/cvs-serv3302/config/etc/initrd Modified Files: mount_cdrom Log Message: - resolved bug #105 - mount_cdrom: incomplete version match of the boot and - the found cd image Index: mount_cdrom =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/mount_cdrom,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- mount_cdrom 26 Nov 2010 13:31:15 -0000 1.54 +++ mount_cdrom 21 Dec 2011 01:03:33 -0000 1.55 @@ -378,9 +378,13 @@ echo -n " checking $disk ... " umount ${FILEMOUNT} 2> /dev/null if /sbin/mount -n -t auto -o rw,noatime $disk ${FILEMOUNT} 2> /dev/null; then + MYVER=$(cat VERSION) if [ -e ${FILEMOUNT}/DEVIL-LINUX ] ; then + MEDIAVER=$(cat ${FILEMOUNT}/DEVIL-LINUX) + fi + if [ -e ${FILEMOUNT}/DEVIL-LINUX ] && [ "${MYVER}" == "${MEDIAVER}" ] ; then $GREEN - echo "media found" + echo -e "Found Devil-Linux v${MEDIAVER}" $NORMAL if [[ "$(ls ${FILEMOUNT}/bootcd.*.new 2>/dev/null)" != "" ]]; then @@ -481,11 +485,10 @@ $NORMAL sleep 10 exit 1 - fi - # run from ram if correct variable is set - if ! run_from_ram --file; then + # run from ram if correct variable is set + if ! run_from_ram --file; 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 @@ -503,9 +506,15 @@ exit 0 fi else - $YELLOW - echo "wrong media" - $NORMAL + if [ -e ${FILEMOUNT}/DEVIL-LINUX ] ; then + $RED + echo "Wrong version (${MEDIAVER})" + $NORMAL + else + $YELLOW + echo "wrong media" + $NORMAL + fi /sbin/umount ${FILEMOUNT} fi else |