summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2003-02-09 01:19:24 +0000
committerFrederic Lepied <flepied@mandriva.com>2003-02-09 01:19:24 +0000
commit4dcb708932932f6108fb3440c7405814d428af74 (patch)
tree0cb6d7145f575adf40c01ffbda63cf9d64dc08b5
parentc9ae53be4bd86da93e650161361a44ac095ebdf7 (diff)
downloaddrakx-4dcb708932932f6108fb3440c7405814d428af74.tar
drakx-4dcb708932932f6108fb3440c7405814d428af74.tar.gz
drakx-4dcb708932932f6108fb3440c7405814d428af74.tar.bz2
drakx-4dcb708932932f6108fb3440c7405814d428af74.tar.xz
drakx-4dcb708932932f6108fb3440c7405814d428af74.zip
check that zeroconf hostname doesn"t contain a .
-rw-r--r--perl-install/network/ethernet.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 125a616f4..4d94b90eb 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -191,7 +191,15 @@ Your host name should be a fully-qualified host name,
such as ``mybox.mylab.myco.com''."),
[ { label => N("Host name"), val => \$netc->{HOSTNAME} },
if_($netc->{ZEROCONF}, { label => N("Zeroconf Host name"), val => \$netc->{ZEROCONF_HOSTNAME} }),
- ]) or goto configureNetwork_step_1;
+ ],
+ complete => sub {
+ if ($netc->{ZEROCONF_HOSTNAME} and $netc->{ZEROCONF_HOSTNAME} =~ /\./ ) {
+ $in->ask_warn('', N("Zeroconf host name must not contain a ."));
+ return 1;
+ }
+ 0;
+ }
+ ) or goto configureNetwork_step_1;
} else {
configureNetworkNet($in, $netc, $last ||= {}, @l) or goto configureNetwork_step_1;
}