summaryrefslogtreecommitdiffstats
path: root/dns_wizard/Bind.pm
diff options
context:
space:
mode:
Diffstat (limited to 'dns_wizard/Bind.pm')
-rw-r--r--dns_wizard/Bind.pm30
1 files changed, 21 insertions, 9 deletions
diff --git a/dns_wizard/Bind.pm b/dns_wizard/Bind.pm
index d99fc8bd..123b62dd 100644
--- a/dns_wizard/Bind.pm
+++ b/dns_wizard/Bind.pm
@@ -20,9 +20,9 @@
package MDK::Wizard::Bind;
use lib qw(/usr/lib/libDrakX);
-#use ugtk2;
-use strict;
+use strict;
+use services;
use common;
use MDK::Wizard::Varspaceval;
use MDK::Wizard::Wizcommon;
@@ -264,6 +264,13 @@ $o->{pages} = {
end => 1,
next => 0,
},
+ error_end => {
+ name => N("Failed"),
+ data => [ { label => N("Relaunch drakwizard, and try to change some parameters.") } ],
+ no_back => 1,
+ end => 1,
+ next => 0,
+ },
};
sub test_srv {
@@ -671,10 +678,13 @@ sub end_it {
# copy in correct place
copy_good();
# start or restart the service
- system('service named restart');
+ if (services::is_service_running('named')) {
+ services::restart('named')
+ } else {
+ services::start('named')
+ }
}
-
sub do_it_master {
return if $::testing;
my $in = 'interactive'->vnew('su', 'dns');
@@ -686,17 +696,19 @@ sub do_it_master {
crea_named_master($IPSERVER, $DOMAINNAME);
end_it();
undef $w;
+ check_started('named');
}
sub do_it_slave {
return if $::testing;
my $in = 'interactive'->vnew('su', 'dns');
my $w = $in->wait_message(N("Slave DNS server"), N("Configuring your system as Slave DNS server ..."));
- do_it();
- rm_rf(glob("$NAMED_DIR/bak*"));
- crea_named_slave($IPSERVER, $DOMAINNAME, $o->{var}{IPMASTER});
- end_it();
-undef $w;
+ do_it();
+ rm_rf(glob("$NAMED_DIR/bak*"));
+ crea_named_slave($IPSERVER, $DOMAINNAME, $o->{var}{IPMASTER});
+ end_it();
+ undef $w;
+ check_started('named');
}
sub get_shortname {