From: Heiko Z. <he...@zu...> - 2004-05-08 23:46:18
|
Friedrich Lobenstock wrote: > Tim Tait wrote on 08.05.2004 21:15 MET: > >> Friedrich Lobenstock wrote: >> >>> Tim Tait wrote on 08.05.2004 19:13 MET: >>> >>>> Friedrich Lobenstock wrote: >>>> >>>>> >>>>> Why don't you change the original mount and add the options >>>>> "ro,noatime" >>>>> there? >>>>> >>>>> Just tried it with my local CD-Rom drive to make sure iso9660 >>>>> accepts the >>>>> "noatime" option. >>>>> >>>>> # mount /dev/cdrom /mnt/ -o ro,noatime # mount | grep /mnt /dev/sr0 >>>>> on /mnt >>>>> type iso9660 (ro,noatime) >>>> >>>> >>>> >>>> >>>> I thought that mounting it read only from the beginning would break >>>> the live-update feature, no? >>> >>> >>> >>> >>> Then your patch should also break it too, shouldn't it? >> >> >> No, because I remount it read-only after the update check is finished >> - ie it will have already copied bootcd.iso.new (if it exists) to >> bootcd.iso, and thus is ready to continue with the normal mount >> sequence, which only requires read access. > > > Ok, were did I have my head. > > >>>> Tho I suppose if is bootcd.iso.new is detected, it could be >>>> remounted rw at >>>> that time. >>> >>> >>> Can you please test that and add the necessary remount's there? >> >> >> I can, though it will mean 2 remounts - one to make it rw for update, >> then another to make ro when update is done. > > > The current situation is using the minimal amount of mount commands. > But for sake of cleaner implementation, meaning in the normal case we > don't need to run two mounts, I think the other way is better. Updating > is a special case anyway and were you have to take special meassures > anyway. How about factoring out the update stuff into another file to > make the mount_cdrom more readable again? > > BTW while looking at the update code I think we should also rename/move > the /mnt/DEVIL-LINUX file so we know from which version to which we are > updating. Heiko!? I thought we don't need this, because when the configuration gets upgraded, then the Admin sees anyway from where to where. On the other hand, you don't really "see" the upgrade, since the system replaces the files and continues the boot process where it then replaces the initrd and reboots again.... >> Should the new diff be done against the original, or the last patched >> version? I don't see that change in CVS yet. > > > The webinterface seems to be up to date, so you can always get the file > from there: > http://cvs.sourceforge.net/viewcvs.py/devil-linux/build/config/etc/initrd/mount_cdrom They're supposed to be only a few hours behind.... > While you are at it, your addition of "if [ "$3" != "silent" ]" should > rather be merged by moving the "if" before "# generate list of cdroms > from devfs" down. > > And while your are using the "rw,noatime" mount option why not merge the > two for-loops into one? Like > > for disk in $CDROMS $PARTITIONS > do > > Heiko |