Mats Erik Andersson <[email protected]> writes: > tisdag den 13 mars 2012 klockan 09:57 skrev Simon Josefsson detta: >> Mats Erik Andersson <[email protected]> writes: >> >> I have pushed 'dnsdomainname' now. Let's take a look at the others >> >> next... >> > >> > BSD systems only provide hostname(1) and domainname(1). >> > >> >> I note that neither of these 'hostname' implementations appears to be >> able to canonicalize the name using the resolver. >> >> That means our 'dnsdomainname' is thus only for compatibility with >> existing GNU/Linux systems. Unless someone finds any other systems out >> there with a 'dnsdomainname' tool on it... > > Observe that "hostname" and "dnsdomainname" were the only executables > in the package "hostname" of Debian GNU/Linux until 2009 in version 2.97. > Only then did "domainname", "ypdomainname", and "nisdomainname" enter.
The code has been in there for a long time though, on 1999 briefly the package installed hardlinks for domainname, nisdomainname and ypdomainname: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=22993 but that lead to a conflict with the 'nis' package: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=48850 so it was reverted. The NIS package in Debian is from http://www.linux-nis.org/ and it appears to be maintained, however the {yp,nis,}domainname tool is GPLv2-only. Presumably *BSD's have NIS as well? Then they probably have some subset of {yp,nis,}domainname commands? The reason there were no man page for it might just be because it is not part of a normal NIS-less installation. > In addition, for GNU/Linux "domainname" is an interface into the settings > of the Linux kernel, it has nothing to do with the resolver. Hence it will > return "(none)" unless the kernel has been told otherwise. This is in > accordance with the mechanisms for BSD systems. Ah, that is where '(none)' comes from. It should not be needed in the dnsdomainname tool, though. This discussion makes me think separating dnsdomainname from hostname was a good move, the tools serve quite different needs and with different history. /Simon
