diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-19 10:06:45 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-19 10:06:45 +0000 |
commit | cc091e6c1e36129797545057ddb5091740447b79 (patch) | |
tree | 2c1997d72c315012c0e3f2889c0eee29794b5acd /perl-install/network/netconnect.pm | |
parent | e3e5faa8c47cf93390be0e31684d4c5f1439b10c (diff) | |
download | drakx-backup-do-not-use-cc091e6c1e36129797545057ddb5091740447b79.tar drakx-backup-do-not-use-cc091e6c1e36129797545057ddb5091740447b79.tar.gz drakx-backup-do-not-use-cc091e6c1e36129797545057ddb5091740447b79.tar.bz2 drakx-backup-do-not-use-cc091e6c1e36129797545057ddb5091740447b79.tar.xz drakx-backup-do-not-use-cc091e6c1e36129797545057ddb5091740447b79.zip |
merge dhcp hostname into hostname step
Diffstat (limited to 'perl-install/network/netconnect.pm')
-rw-r--r-- | perl-install/network/netconnect.pm | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index b50ba6c4b..e6b333e69 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -743,22 +743,26 @@ I cannot set up this connection type.")), return; Your host name should be a fully-qualified host name, such as ``mybox.mylab.myco.com''. You may also enter the IP address of the gateway if you have one."), - data => - [ { label => N("Host name"), val => \$netc->{HOSTNAME} }, - { label => N("DNS server 1"), val => \$netc->{dnsServer} }, - { label => N("DNS server 2"), val => \$netc->{dnsServer2} }, - { label => N("DNS server 3"), val => \$netc->{dnsServer3} }, - { label => N("Search domain"), val => \$netc->{DOMAINNAME}, - help => N("By default search domain will be set from the fully-qualified host name") }, - { label => N("Gateway (e.g. %s)", $gateway_ex), val => \$netc->{GATEWAY} }, - if_(@devices > 1, - { label => N("Gateway device"), val => \$netc->{GATEWAYDEV}, list => \@devices }, - ), - ], + data => sub { + [ if_(!$auto_ip, { label => N("Host name"), val => \$netc->{HOSTNAME} }), + { label => N("DNS server 1"), val => \$netc->{dnsServer} }, + { label => N("DNS server 2"), val => \$netc->{dnsServer2} }, + { label => N("DNS server 3"), val => \$netc->{dnsServer3} }, + { label => N("Search domain"), val => \$netc->{DOMAINNAME}, + help => N("By default search domain will be set from the fully-qualified host name") }, + if_(!$auto_ip, { label => N("Gateway (e.g. %s)", $gateway_ex), val => \$netc->{GATEWAY} }, + if_(@devices > 1, + { label => N("Gateway device"), val => \$netc->{GATEWAYDEV}, list => \@devices }, + ), + ), + ], + }, complete => sub { - if ($netc->{dnsServer} && !is_ip($netc->{dnsServer})) { - $in->ask_warn('', N("DNS server address should be in format 1.2.3.4")); - return 1; + foreach my $dns (qw(dnsServer dnsServer2 dnsServer3)) { + if ($netc->{$dns} && !is_ip($netc->{$dns})) { + $in->ask_warn(N("Error"), N("DNS server address should be in format 1.2.3.4")); + return 1; + } } if ($netc->{GATEWAY} && !is_ip($netc->{GATEWAY})) { $in->ask_warn('', N("Gateway address should be in format 1.2.3.4")); |