LINUX.ORG.RU
решено ФорумAdmin

генту потерял хостнейм


0

1
┌─[foo]─[/home/user]
└──╼ cat /etc/hosts
127.0.0.1 foo.example.com example localhost
┌─[foo]─[/home/user]
└──╼ cat /etc/conf.d/hostname 
# Set to the hostname="foo"
hostname="foo"
┌─[foo]─[/home/user]
└──╼ cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /usr/share/doc/openrc*/net.example* and save your configuration
# in /etc/conf.d/net (this file :]!).
modules="!iproute2"
config_enp5s0="192.168.1.2 netmask 255.255.255.0 brd 192.168.1.255"
routes_enp5s0="default via 192.168.1.1"
#dns_servers="127.0.0.1"
# dns_domain_lo="example.com"
#bridge_br0="enp5s0"
#config_eth0="null"
#config_br0="dhcp"
#brctl_br0="setfd 0 sethello 0 stp on"
# The network scripts are now part of net-misc/netifrc
# In order to avoid sys-apps/openrc-0.12.4 from removing this file, this comment was
# added; you can safely remove this comment.  Please see
# /usr/share/doc/netifrc*/README* for more information.

после перезагрузки:

┌─[foo]─[/home/user]
└──╼ hostname -d
hostname: No address associated with name
┌─[✗]─[foo]─[/home/user]
└──╼ hostname -f
hostname: No address associated with name

★★★★

dns_domain_lo закомментирован и нет foo в /etc/hosts ? Действительно, в чём же проблема?!

pinkbyte@oas1 ~ $ hostname 
oas1
pinkbyte@oas1 ~ $ hostname -f
oas1.dstu.local
pinkbyte@oas1 ~ $ cat /etc/hosts | grep 127.0.0.1
127.0.0.1       oas1.dstu.local oas1 localhost
pinkbyte@oas1 ~ $ dnsdomainname 
dstu.local
pinkbyte@oas1 ~ $ cat /etc/resolv.conf | grep domain
domain dstu.local

А теперь сравни со своими конфигами и почувствуй в чём разница

Pinkbyte ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.