Bug #10041
openBy default, domainname(1) displays " " rather than ""
0%
Description
On a freshly installed OpenIndiana machine, with no domain name explicitly set,
domainname(1) displays a white space followed by line-feed rather than line-feed:
- domainname | od -t a
0000000 sp lf
0000002
The problem seems to be at the lower level of sysinfo(SI_SRPC_DOMAIN, ...)
which returns " " rather than ""
- truss domainname
execve("/usr/bin/domainname", 0x0803E02C, 0x0803E034) argc = 1
...
sysinfo(SI_SRPC_DOMAIN, " ", 256) = 2
ioctl(1, TCGETA, 0x0803D0EE) = 0
fstat64(1, 0x0803D030) = 0
write(1, " \n", 2) = 2
_exit(0)
- cat /etc/motd
The Illumos Project SunOS 5.11 illumos-7d1eae8c55 December 2018
Updated by Hubert Garavel over 4 years ago
More details
\# svcs -a | grep nis
disabled 10:08:19 svc:/network/nis/client:default
\# svcs -a | grep dns
disabled 10:08:19 svc:/network/dns/install:default
disabled 10:08:21 svc:/network/dns/multicast:default
disabled 10:08:21 svc:/network/dns/server:default
online 10:08:38 svc:/network/dns/client:default
\# cat /etc/defaultdomain
cat: cannot open /etc/defaultdomain: No such file or directory
Updated by Hubert Garavel over 4 years ago
I was able to reproduce this problem on another machine, just after
a fresh installation using the OpenIndiana Live x86 DVD installer.
Perhaps, the problem is caused by the installer itself, which might
set the domain name to " ", although the machine is in a network
with a defined domain name.