From 4dcb708932932f6108fb3440c7405814d428af74 Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Sun, 9 Feb 2003 01:19:24 +0000 Subject: check that zeroconf hostname doesn"t contain a . --- perl-install/network/ethernet.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'perl-install/network/ethernet.pm') 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; } -- cgit v1.2.1