Disabling DNS not working
I disabled the service DNS. I don't want the server to run DNS, rather point it to my REAL DNS server.
After a LOT of fiddling, I thought I had everything working and rebooted. Rebooting rewrote at least:
I ASSUME it rewrote /etc/sysconfig/network-scripts/ifcfg-eth0, but I did not need that to have any different content.
So disabling DNS does NOT do enough. resolv.conf and hosts at least MUST be left alone or just disallow disabling DNS.
#1 Updated by rgmhtt over 10 years ago
If you disable DNS, then /usr/bin/hdactl needs the following to happen:
In sub print_network, instead of:
printf $RSLV "nameserver $net.$self\n";
You instead need:
printf $RSLV "nameserver $dns1\n";
printf $RSLV "nameserver $dns2\n";
Provided $dns2 is not null.
This will result in /etc/resolv.conf pointing to the right place(s). There might be other changes needed, I will be testing some more. Sorry I cannot give you the complete changes needed in hdactl; I don't know how to detect DNS is off, or how to check that $dns2 is not null.
#2 Updated by rgmhtt over 10 years ago
- Status changed from New to Feedback
I just worked out that you also have to 'fix' ifcfg-eth0:
Again, how you choose which one to use, I have not figured out. But without this change, if you restart the network, the DNS1 and DNS2 contents are used to overwrite /etc/resolv.conf to the wrong values...
This was not obvious from looking at hdactl. I had to deduce it based on system behaviour.
Also available in: Atom