[Gambas-user] System.Domain empty

Ron ron at ...1740...
Fri May 16 10:24:38 CEST 2008


Benoit Minisini schreef:
> On jeudi 15 mai 2008, Ron wrote:
>   
>> System.Domain is empty (none) on my system (Debian 4.0) gambas 2.6
>>
>> hostname -f is giving correct fqdn
>>
>> Where should it be defined?
>>
>> Regards,
>> Ron.
>>
>>     
>
> The Linux man page are not very clear...
>
> Apparently, you have:
> - A system host name.
> - A system domain name, or DNS domain name.
> - A NIS/YP domain name.
>
> hostname -f returns the third, but System.Domain uses the getdomainname() 
> system call that seems to return the second.
>
> Try "man hostname" to get more information.
>
> Regards,
>
>   

This is what I see.. so it looks like gambas is reading the NIS domain 
instead of the correct one (-d).
Since (none) is what I see in gambas. Maybe hostname arguments are not 
the same on linux distros?
-------------------------------------------------
ron at ...197...:~$ hostname -h
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.
--------------------------------------------

server:~$ hostname -d
cyberjunky.nl

server:~$ hostname -y
(none)

server:~$ hostname -f
machine.cyberjunky.nl

Gambas 2.6 on Debian 4.0

Regards,
Ron




More information about the User mailing list