summaryrefslogtreecommitdiffstats
path: root/common/Wizcommon.pm
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2004-12-10 13:46:28 +0000
committerAntoine Ginies <aginies@mandriva.com>2004-12-10 13:46:28 +0000
commitfa32a27e4b93b9c0b754a0be8749cfe98713de29 (patch)
tree853fcdbe3836c41bcb1b247a4f25283dda81a5c5 /common/Wizcommon.pm
parent4c72bff6b8bbdcab484efac2bae27f7ec372ced3 (diff)
downloaddrakwizard-fa32a27e4b93b9c0b754a0be8749cfe98713de29.tar
drakwizard-fa32a27e4b93b9c0b754a0be8749cfe98713de29.tar.gz
drakwizard-fa32a27e4b93b9c0b754a0be8749cfe98713de29.tar.bz2
drakwizard-fa32a27e4b93b9c0b754a0be8749cfe98713de29.tar.xz
drakwizard-fa32a27e4b93b9c0b754a0be8749cfe98713de29.zip
add hostname and domainname test
Diffstat (limited to 'common/Wizcommon.pm')
-rw-r--r--common/Wizcommon.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/common/Wizcommon.pm b/common/Wizcommon.pm
index 68f3d50e..edbbbf3f 100644
--- a/common/Wizcommon.pm
+++ b/common/Wizcommon.pm
@@ -27,7 +27,7 @@ use MDK::Common;
use MDK::Wizard::IFCFG;
our @ISA = qw(Exporter);
-our @EXPORT = qw(check_started run_command_and_log);
+our @EXPORT = qw(check_started run_command_and_log test_host_domain);
my $net;
@@ -51,6 +51,18 @@ sub check_started {
}
}
+sub test_host_domain {
+ my ($SHORTHOSTNAME, $DOMAINNAME) = @_;
+ if ($SHORTHOSTNAME =~ /localhost/) {
+ return 0, N("You need to readjust your hostname. 'localhost' is not a correct hostname for a DNS server. Hostname must be a FQDN: Fully Qualified Domain Name")
+ }
+ if (member($DOMAINNAME, qw(localdomain (none))) && -z $DOMAINNAME) {
+ return 0, N("You need to readjust your domainname. For a DNS server you need a correct domainname, not equal to localdomain or none. Hostname must be a FQDN: Fully Qualified Domain Name. Launch drakconnect to adjust it.")
+ }
+ return 1;
+}
+
+
my $timeout;
sub gtktext_get_log {