On Fri, 26 Feb 2010 20:38:20 +0300 Yuri Kozlov <[email protected]> wrote:
> В Fri, 26 Feb 2010 23:10:24 +0600 > Dmitry Fedorov <[email protected]> пишет: > > > 26 февраля 2010 г. 22:16 пользователь Yuri Kozlov написал: > > > Denis Feklushkin пишет: > > > > > >> можно было бы прописывать fqdn и не париться, хотя это и не удобно, но > > >> всё дело в том что в man hostname есть такая строчка: "/etc/hostname > > >> This file should only contain domain name and not the full FQDN" > > > > > > Это про то, что в файле, а не про то, что должно отдаваться по > > > hostname. > > > > > > Если написать длинное, то что будет отдаваться при hostname --fqdn? > > > > Дочитайте man hostname до конца: > > > > THE FQDN > > You can't change the FQDN (as returned by host- > > name --fqdn) or the DNS domain name (as returned > > by dnsdomainname) with this command. The FQDN of > > the system is the name that the resolver(3) > > returns for the host name. > > > > Technically: The FQDN is the name getaddrinfo(3) > > returns for the host name returned by gethost- > > name(2). The DNS domain name is the part after > > the first dot. > > > > Therefore it depends on the configuration (usu- > > ally in /etc/host.conf) how you can change it. > > Usually (if the hosts file is parsed before DNS > > or NIS) you can change it in /etc/hosts. > > > > > > В простом случае, если хотите нужный вам fqdn, > > пропишите его в /etc/hosts поближе к началу, > > сразу после localhost. > > Это понятно. Автор поста хочет назначить НЕ хочет, но приходится > длинное имя с помощью > # hostname vmware.grid.h-----g.com > > Как же тогда будет отрабатывать hostname --fqdn. > В прочем, попробовал: > yu...@keeper:/tmp$ sudo hostname keeper.home.loc > yu...@keeper:/tmp$ hostname --fqdn > keeper.home.loc > yu...@keeper:/tmp$ hostname > keeper.home.loc > yu...@keeper:/tmp$ hostname -d > home.loc > > Глотает гад. > Версия hostname 3 вчера у меня инвертивровала ключик -f, показывала с ним одно только имя компьютера, а без него вместе с доменом :) Откатил на 2.95 -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/20100227004614.294bb...@db

