Summary: | system domainname is never set | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexander Papaspyrou <axp> |
Component: | [OLD] Core system | Assignee: | Martin Schlemmer (RETIRED) <azarah> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | genone, ltskinol |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Patch for agetty
Patch for agetty manpage |
Description
Alexander Papaspyrou
2003-06-05 08:18:24 UTC
which install did you do 1.2 ? 1.4 ? Code listing 19.1: Configuring Hostname # echo mymachine > /etc/hostname Then edit /etc/dnsdomainname so that it contains your DNS domainname, i.e. mydomain.com. Code listing 19.2: Configuring Domainname # echo mydomain.com > /etc/dnsdomainname If you have a NIS domain, you should set it in /etc/nisdomainname. Code listing 19.3: Configuring NIS Domainname # echo nis.mydomain.com > /etc/nisdomainname I did 1.4 and issued the stated things to my system. However, /etc/issue output is not correct: --8<-- snip --8<-- This is \n.\o, running \m-\s (kernel \r). Welcome to [\l] on \d, \t (\U logged in). -->8-- snap -->8-- expands to --8<-- snip --8<-- This is wallace.(none), running i686-Linux (kernel 2.4.20-xfs-r3). Welcome to [vc/1] on Thu Jun 5 2003, 17:45:08 (0 users logged in). -->8-- snap -->8-- Also, /bin/domainname returns (none). /bin/dnsdomainname seems to work correctly. BTW, setting the domainname with # domainname mydomain.net fixes this issue. Maybe this should be included into the hostname init script. For DHCP users (which I suspect is most home users), the domain name is retrieved by the dchpcd client. So I think the proper fix for those folks is to add the -D flag to the /etc/init.d/net.eth0 script. I did this, and it does what I want. This could easily be integrated into a new baselayout. > For DHCP users (which I suspect is most home users), the domain name is
> retrieved by the dchpcd client. So I think the proper fix for those
> folks is to add the -D flag to the /etc/init.d/net.eth0 script. I did
> this, and it does what I want. This could easily be integrated into a
> new baselayout.
>
Personally I do not see this as an issue, as there is $dhcpcd_eth0, etc
that they can add the -D to if needed.
Good point. I'll give it a try. Seems like a better solution than adding it to the startup script. Maybe a comment to this effect could be added to the system default /etc/conf.d/net file? While dhcp users can add -D if they want, this doesn't resolve the fact that the domainname is never set properly for static IP users. I've done this and it has resolved all issues for me: init.d # diff domainname domainname.old 52d51 < /bin/domainname ${mydnsdomain} IMHO Gentoo should run the /etc/init.d/domainname script like /etc/init.d/hostname - in /sbin/rc! what's really strange is that you *have to* set /etc/nisdomainname to your dnsdomainname so that the output of 'domainname' (and the /etc/issue as well) shows the domainname you want... Created attachment 14424 [details, diff]
Patch for agetty
Patch for agetty (from util-linux-2.11z) to have an option in /etc/issue to
show the dns domainname (as this is annoying people). It does not interfere
with the NIS domainname.
Created attachment 14425 [details, diff]
Patch for agetty manpage
Patch to document the new option in /etc/issue
Hmm, nice Marius Mauch - did you send it to the upstream developers for consideration ? Anyhow, in -r6 of util-linux, with 1.8.6.9 that will support this. no, I didn't, just wrote it as a quick fix (motivated by drobbins). You think I should (it seems rather trivial for me) ? |