Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 23441

Summary: Without an NIS domain and therefore no /etc/nisdomainname, login gives a very ugly looking rendition of /etc/issue
Product: Gentoo Linux Reporter: Pat Lougheed <pat>
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: trivial    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Pat Lougheed 2003-06-25 00:50:37 UTC
If you install from a Gentoo CD (the one in use specifically was a post 1.4rc4 
experimental live cd), and don't put a value in /etc/nisdomainname, the resulting 
printout from login gives an ugly output of the form: 
 
This is hostname.(none) (Linux 2.4.....) 00:00:00 
 
First off, setting /etc/dnsdomainname won't run /bin/domainname for two reasons. 
One is that /etc/init.d/domainname is set to only run that is /etc/nisdomainname 
is set. The second is that /etc/init.d/domainname isn't in either the default or 
boot runlevels by default. You have to add it yourself.  
 
The default /etc/issue file looks like this: 
 
This is \n.\o (\s \m \r) \t 
 
The \o makes login print the output from /bin/domainname, which, again, isn't run. 
 
This results in output like that above, rather than a cleaner/nicer "This is 
hostname.domainname (Linux...." 

Reproducible: Always
Steps to Reproduce:
1. Install the system 
2. Neglect/don't set NIS domain in /etc/nisdomainname. I only have a DNS domain, 
not running NIS, so I don't set this. 
3. Finish install, reboot, check out /etc/issue as printed by login 
Actual Results:  
"This is yamato.(none) (Linux 2.4.21) 00:10:00 

Expected Results:  
"This is yamato.my.domain (Linux 2.4.21) 00:10:00 

Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1) 
================================================================= 
System uname: 2.4.21 i686 Intel(R) Xeon(TM) CPU 2.66GHz 
GENTOO_MIRRORS="http://gentoo.slinky.iat.sfu.ca/ 
ftp://cs.ubishops.ca/pub/gentoo  
 http://adelie.polymtl.ca/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo" 
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config 
/usr/kde/2/share/confi  
g /usr/kde/3/share/config" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
PORTDIR="/usr/portage" 
DISTDIR="/usr/portage/distfiles" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR_OVERLAY="/usr/local/portage" 
USE="x86 aalib acl acpi apache2 berkdb cdr cjk crypt cups curl doc dvd gdbm ipv6  
 ldap kerberos libwww mmx pam perl readline samba sasl slang slp snmp sse ssl tc  
pd usb xml xml2 zlib" 
COMPILER="gcc3" 
CHOST="i686-pc-linux-gnu" 
CFLAGS="-O3 -march=pentium3 -funroll-loops -fprefetch-loop-arrays -pipe" 
CXXFLAGS="-O3 -march=pentium3 -funroll-loops -fprefetch-loop-arrays -pipe" 
ACCEPT_KEYWORDS="x86 ~x86" 
MAKEOPTS="-j5" 
AUTOCLEAN="yes" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
FEATURES="sandbox buildpkg ccache"
Comment 1 Allan Que 2003-07-04 19:31:46 UTC
According to the man page for /bin/domainname, it shows and sets the NIS/YP domain name. The proper location for your domain would be in /etc/nisdomainname. The /etc/dnsdomainname only sets the domain line of /etc/resolv.conf.

The best solution IMHO is to set both files to the same domain and put /etc/init.d/domainname in boot.
Comment 2 Joe Frisbie 2003-08-12 09:54:58 UTC
This is the same as bug 25954

Please see comments there too.
Comment 3 Martin Holzer (RETIRED) gentoo-dev 2003-08-13 22:55:05 UTC

*** This bug has been marked as a duplicate of 25954 ***