Changing dhclient hardcoded options (Debian)

Nicolas C. dhcp at nryc.fr
Tue Aug 25 06:34:21 UTC 2015


On 25/08/2015 01:02, Alex Bligh wrote:
>
> On 24 Aug 2015, at 22:11, Nicolas C. <dhcp at nryc.fr> wrote:
>
>> It seems that the package "ifupdown" on Debian provides hardcoded options for dhclient :
>>
>> http://stackoverflow.com/questions/14720571/which-program-invokes-dhclient-on-debian-squeeze
>>
>> I'd like to run dhclient with the "-i" option, is there an easy way (no recompiling / packaging) to do this?
>
> Something like this (untested)
>
> mv /sbin/dhclient /sbin/dhclient.orig
>
> cat > /sbin/dhclient
> #!/bin/bash
> exec /sbin/dhclient.orig -i "$@"
> ^D
>
> chmod 755 /sbin/dhclient

Of course! And I can use "dpkg-divert" to keep this script even if
the package "isc-dhcp-client" is updated.

Thanks!


More information about the dhcp-users mailing list