Michael Biebl a écrit :
> Vincent Danjean wrote:
>>
>> dhcdbd installs the file /etc/dhcp3/dhclient-exit-hooks.d/dhcdbd that
>> is sourced by dhclient when dhcp event occurs.
>> The problem is that this file uses 'exit 0' in some cases (exactly when
>> "(( ( dhc_dbus & 31 ) == 31 ))" is true). Is this case,
>> /sbin/dhclient-script exits immediately and does not process the other
>> scripts in /etc/dhcp3/dhclient-exit-hooks.d
>>
>> So please :
>> * remove this 'exit 0' in the script
>> * or strongly document why all dhcp scripts named after dhcdbd in
>>   alphabetic order will not run in some cases (and which cases exactly).
>>
>> As I see no reason to forbid a 'smtp' script but not a 'asmtp' script, I
>> thing you really need to remove the 'exit 0'
> 
> I think 'exit_with_hooks 0' should be used. Should also work in your case.

I do not really understand what you suggest. Is it to replace the
'exit 0' by 'exit_with_hooks 0' in
etc/dhcp3/dhclient-exit-hooks.d/dhcdbd ?

If I correctly read the code, dhclient executes /sbin/dhclient-script.
At the end of this script, there is a call to 'exit_with_hooks 0'
In this function, dhclient-script sources one after the other all the
files in /etc/dhcp3/dhclient-exit-hooks.d/
  The problem is that /etc/dhcp3/dhclient-exit-hooks.d/dhcdbd calls
'exit 0' so /sbin/dhclient-script exits immediately without sourcing
the other scripts in /etc/dhcp3/dhclient-exit-hooks.d/
I do not understand why this 'exit 0' is needed. It is not documented
and makes the dhcp script system behave very strangely. Some scripts are
executed, and others are not.
  And I do not think that calling 'exit_with_hooks 0' instead of
'exit 0' will work: there will be infinite recursion (but I do not test
it, yet)

  Best regards,
    Vincent

> Cheers,
> Michael



Reply via email to