This is one of the variables setable by sysctl.conf. You can set your dnsdomain name in /etc/conf.d/net, and /bin/dnsdomainname may give the correct answer, but that variable is left as empty. Does this actually matter to anything? Reproducible: Always Steps to Reproduce: 1. sysctl -a | grep name 2. 3. Actual Results: its possible to manually set it, but again, it doesn't seem to do anything.
the standard kernel syscalls that the standard utilities make when setting the hostname/domainname take care of updating the internal variables that the /proc/sys/ interface exposes. there's no point in setting them in two places when one already updates the other.
(In reply to comment #1) > the standard kernel syscalls that the standard utilities make when setting the > hostname/domainname take care of updating the internal variables that the > /proc/sys/ interface exposes. there's no point in setting them in two places > when one already updates the other. > This turns out not to be the case. It's easy to show. Case #1. set your dns name in /etc/conf.d/net reboot and confirm that it is set by running /bin/dnsdomainname. cat /proc/sys/kernel/domainname to get (none) Case #2 remove dns name from /etc/conf.d/net and /etc/resolv.conf reboot and confirm that it is not set by running /bin/dnsdomainname. (returns Unknown Host) Then edit /etc/sysctl.conf kernel.domainname=example.com and reboot /bin/dnsdomainname still returns Unknown Host cat /proc/sys/kernel/domainname gives example.com Conclusion: They don't share internal state. So whats it for? Regards, john
you arent comparing apples to apples # domainname f # cat /proc/sys/kernel/domainname f