diff options
author | Antoine Ginies <aginies@mandriva.com> | 2004-02-06 11:52:15 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2004-02-06 11:52:15 +0000 |
commit | 01ea83268bec202495d3416dd4db97e1e300c18a (patch) | |
tree | 72583bc962295aa9d6c3bb12796ab982cdb5e1bf /dns_wizard/Bind.pm | |
parent | a6ba85f1a4eb5491b6c6a692f49c216e95215686 (diff) | |
download | drakwizard-01ea83268bec202495d3416dd4db97e1e300c18a.tar drakwizard-01ea83268bec202495d3416dd4db97e1e300c18a.tar.gz drakwizard-01ea83268bec202495d3416dd4db97e1e300c18a.tar.bz2 drakwizard-01ea83268bec202495d3416dd4db97e1e300c18a.tar.xz drakwizard-01ea83268bec202495d3416dd4db97e1e300c18a.zip |
use check_started from Wizcommon
Diffstat (limited to 'dns_wizard/Bind.pm')
-rw-r--r-- | dns_wizard/Bind.pm | 30 |
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 { |