Package: hostname
Version: 2.93
Severity: normal

*** Please type your report below this line ***
According to 'hostname --help', invoking hostname as domainname should display the NIS/YP domain name, instead the host name is displayed. Transcript follows:

$ hostname
dreamcoat
$ hostname -y
che.uct.ac.za
$ ln -s /bin/hostname domainname
$ ./domainname
dreamcoat

Output of 'hostname --help':

$ hostname --help
Usage: hostname [-v] {hostname|-F file}      set host name (from file)
      domainname [-v] {nisdomain|-F file}   set NIS domain name (from file)
      hostname [-v] [-d|-f|-s|-a|-i|-y]     display formated name
      hostname [-v]                         display host name

      hostname -V|--version|-h|--help       print info and exit

   dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y

   -s, --short           short host name
   -a, --alias           alias names
   -i, --ip-address      addresses for the host name
   -f, --fqdn, --long    long host name (FQDN)
   -d, --domain          DNS domain name
   -y, --yp, --nis       NIS/YP domain name
   -F, --file            read host name or NIS domain name from given file

  This command can get or set the host name or the NIS domain name. You can
  also get the DNS domain or the FQDN (fully qualified domain name).
  Unless you are using bind or NIS for host lookups you can change the
  FQDN (Fully Qualified Domain Name) and the DNS domain name (which is
  part of the FQDN) in the /etc/hosts file.

As some commercial packages expect the NIS/YP domain name, I suggest inserting the following lines in hostname.c:

   if (!strcmp(progname, "domainname"))
       type = NIS;

immediately below the lines:

   if (!strcmp(progname, "dnsdomainname"))
       type = DNS;

Alternatively, the help text should be updated to match the current behavior.

-- System Information:
Debian Release: 4.0
 APT prefers stable
 APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.25.4-dreamcoat
Locale: LANG=en_ZA.UTF-8, LC_CTYPE=en_ZA.UTF-8 (charmap=UTF-8)

Versions of packages hostname depends on:
ii  libc6                  2.3.6.ds1-13etch7 GNU C Library: Shared libraries

hostname recommends no packages.

-- no debconf information




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to