Changing dhclient hardcoded options (Debian)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing dhclient hardcoded options (Debian)

Nicolas C.
Hello,

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?

Thanks,
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Changing dhclient hardcoded options (Debian)

Alex Bligh

On 24 Aug 2015, at 22:11, Nicolas C. <[hidden email]> 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

--
Alex Bligh




_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Changing dhclient hardcoded options (Debian)

Nicolas C.
On 25/08/2015 01:02, Alex Bligh wrote:

>
> On 24 Aug 2015, at 22:11, Nicolas C. <[hidden email]> 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!
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users