generic /etc/dhclient.conf not working
Hello
Im trying to use the generic /etc/dhclient.conf file as mention in
/etc/sysconfig/network-scripts/ifup-eth file
But the code seems incorrect because it never uses the generic file.
I do not want to generate dhcleint.conf for each device.
Am I missing something or this is a bug?
# allow users to use generic '/etc/dhclient.conf' (as documented in manpage!)
# if per-device file doesn't exist or is empty
if [ -s /etc/dhcp/dhclient-${DEVICE}.conf ]; then
DHCLIENTCONF="-cf /etc/dhcp/dhclient-${DEVICE}.conf";
elif [ -s /etc/dhclient-${DEVICE}.conf ]; then
DHCLIENTCONF="-cf /etc/dhclient-${DEVICE}.conf";
else
DHCLIENTCONF='';
Fi;
Responses
Hello Asaf,
Can you provide more details as to what is not working, or how it is broken? Also - which release/version of OS and of the dhclient package.
I have a few suspicions:
* a previous DHCP offer has cached some information
* NetworkManager is preventing you from doing what you would like to do
* SELinux might be playing a role (or simple file permissions on the file you created in /etc)
I don't use/manage DHCP (the few boxes I have fortunately just work). I am now amazed at how much is involved with the process when I looked through the scripts to try and help.
Hopefully someone can help figure this out!
Hello Asaf - sorry for the slow response, I had to put RHEL back on a workstation instead of Fedora to test this. I do not see ANY reference to "dhclient.conf" in the ifup files.
[root@morpheus network-scripts]# pwd
/etc/sysconfig/network-scripts
[root@morpheus network-scripts]# grep dhclient.conf *
[root@morpheus network-scripts]#
Unfortunately I don't know how to help with the specific issue you are having. (perhaps because I use NetworkManager?)
The only file that I can find that had value was:
cat /etc/NetworkManager/dispatcher.d/10-dhclient
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
