diff options
author | Eugeni Dodonov <eugeni@mandriva.org> | 2009-06-25 14:54:41 +0000 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.org> | 2009-06-25 14:54:41 +0000 |
commit | 4cf8e149729b8a76ae5ec93f078d2eea43f9af9c (patch) | |
tree | 9be49b161e50c8783c8f1a17cb0457a5e0eedb40 /lib/network/connection | |
parent | 9534590f7c7369280302724bedc736a38acb3c05 (diff) | |
download | drakx-net-4cf8e149729b8a76ae5ec93f078d2eea43f9af9c.tar drakx-net-4cf8e149729b8a76ae5ec93f078d2eea43f9af9c.tar.gz drakx-net-4cf8e149729b8a76ae5ec93f078d2eea43f9af9c.tar.bz2 drakx-net-4cf8e149729b8a76ae5ec93f078d2eea43f9af9c.tar.xz drakx-net-4cf8e149729b8a76ae5ec93f078d2eea43f9af9c.zip |
Show default hostname when no hostname was defined, to have visual
feedback on what will be used if user does not changes the hostname
(#35143, #38557, #47364).
Diffstat (limited to 'lib/network/connection')
-rw-r--r-- | lib/network/connection/ethernet.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm index 1722da7..d764f4d 100644 --- a/lib/network/connection/ethernet.pm +++ b/lib/network/connection/ethernet.pm @@ -209,6 +209,8 @@ sub guess_hostname_settings { sub get_hostname_settings { my ($self) = @_; my $auto_hostname = sub { $self->{protocol} eq 'dhcp' && $self->{address}{needhostname} }; + # configure the default hostname so the hostname setting should be more obvious to the users + $self->{address}{hostname} = 'localhost.localdomain' unless $self->{address}{hostname}; [ if_($self->{protocol} eq 'dhcp', { text => N("Assign host name from DHCP server (or generate a unique one)"), val => \$self->{address}{needhostname}, type => "bool" }, |