Comment 30 for bug 45842

Revision history for this message
Kees Cook (kees) wrote :

Excellent work. I think this is very close to a solution. I think some more testing and some additional tweaking is needed. My notes after looking over all the scripts' interactions:

- if-up.d/mountnfs should not run unless the required rc scripts are finished (i.e. finished with rcS.d)
    - note the existing hack to start portmap/nfs-common
    - other infrastructure may not be ready (mtab)
- init.d/waitnfs.sh could then run after all the interfaces came up and already aborted their (too early) attempt to mount, so it will need to initiate a mount-all-netfs too.
- races from all directions (udev, manual ifup, waitnfs) is (and will be) a problem since the current locking isn't good enough (mkdir "lock" isn't a sane lock for tight races)
    - perhaps use /lib/udev/watershed to run a new nfs-mounting-helper script from both if-up.d/mountnfs and init.d/waitnfs.sh ?