On 28.02.2012 23:29, Steve Langasek wrote: > On Tue, Feb 28, 2012 at 08:47:16PM +0100, Michael Biebl wrote: >>> subsequent hooks. OTOH, there might be cases where that's beneficial >>> because it lets a critical hook declare that an interface bring-up hasn't >>> succeeded and the interface bring-up should be rolled back so the admin can >>> try again. > >> If that is the only use-case for this change (and I can't come up with a >> better argument for this change either), I'd prefer if we use a >> dedicated return code for this case. > > That's sloppy. There are no "reserved" error codes to draw on here; any > possible error code you want to use for this could have a collision with a > return code an existing script is already using in the case of some error > that should be considered non-fatal. Correct. > The only responsible thing to do here is to review all the hook scripts and > correct them in a coordinated fashion. As you already noted, what is a proper exit code then? I don't think a hook should return with a zero exit code if it actually failed in a way. If a hook failure should be fatal which will result in a interface not being marked as active, we need a better way to signal that to ifupdown then a simple non-zero return code, imo. Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Attachment:
signature.asc
Description: OpenPGP digital signature