Comment 20 for bug 610869

Revision history for this message
Steve Langasek (vorlon) wrote :

I don't think I've misunderstood anyone here, though I may have misunderstood the code. Also, I don't think everyone commenting on this bug report actually has the same goals.

There are three orthogonal aspects of boot behavior that users may wish to configure here.
 - whether to hold up the boot waiting for a device (nobootwait/bootwait)
 - how long to wait for the device before concluding it's not going to show up ("timeout=n" in theory... in practice, timeout + --dev-wait-time=N)
 - what to do if a waited-for device hits the timeout: throw an error, or continue without? ("nofail", in theory)

So a more careful inspection of the code shows me that 'timeout' doesn't directly do anything useful; all it does is cause an event to be emitted, it doesn't interact with 'nofail' at all or otherwise allow the boot to proceed noninteractively if the device is absent.

In theory, what you *could* do with the existing functionality is create a job which is 'start on device-not-ready MOUNTPOINT=$MOUNTPOINT' and calls 'mntctl change-mount none $MOUNTPOINT'. E.g.:

  start on device-not-ready MOUNTPOINT=/opt/vms
  exec mntctl change-mount none $MOUNTPOINT

But when I test this I get an assertion failure from NIH. So I guess this code hasn't been adequately tested. Anyway, I wouldn't recommend this as the right way to do this, but was hoping to be able to offer it as a workaround.