Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202617 - /proc/sys/kernel/domainname not set
Summary: /proc/sys/kernel/domainname not set
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-17 20:31 UTC by John Huttley
Modified: 2007-12-19 11:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Huttley 2007-12-17 20:31:49 UTC
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.
Comment 1 SpanKY gentoo-dev 2007-12-18 07:51:26 UTC
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.
Comment 2 John Huttley 2007-12-19 04:19:19 UTC
(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


Comment 3 SpanKY gentoo-dev 2007-12-19 11:47:31 UTC
you arent comparing apples to apples

# domainname f
# cat /proc/sys/kernel/domainname
f