Note that the man page for dhclient-script says:

The exit status of dhclient-script will be passed to dhclient-exit-hooks in the exit_sta‐ tus shell variable, and will always be zero if the script succeeded at the task for which it was invoked. The rest of the environment as described previously for dhclient-enter- hooks is also present. The /etc/dhcp/dhclient-exit-hooks and /etc/dhcp/dhclient-exit- hooks.d/* scripts can modify the value of exit_status to change the exit status of
dhclient-script.

This seems to be in conflict with the implemented fix of setting exit_status=0 before calling the hooks. If the man page is correct, each script in turn should have the chance to update exit_status, and the value after calling the final script is the one to use for return.

Arne

Reply via email to