diff options
author | Nicolas Vigier <nvigier@mandriva.com> | 2008-03-28 15:38:36 +0000 |
---|---|---|
committer | Nicolas Vigier <nvigier@mandriva.com> | 2008-03-28 15:38:36 +0000 |
commit | b90c525b28bcbc65201b049161b3aab1566e6886 (patch) | |
tree | 42cd02951b67aeffaf790aef4c4e88053539f9be /common | |
parent | c0fc5c2ceaeeb7d758467067cb312aa1d9ca322f (diff) | |
download | drakwizard-b90c525b28bcbc65201b049161b3aab1566e6886.tar drakwizard-b90c525b28bcbc65201b049161b3aab1566e6886.tar.gz drakwizard-b90c525b28bcbc65201b049161b3aab1566e6886.tar.bz2 drakwizard-b90c525b28bcbc65201b049161b3aab1566e6886.tar.xz drakwizard-b90c525b28bcbc65201b049161b3aab1566e6886.zip |
add check_starts_on_boot function
Diffstat (limited to 'common')
-rw-r--r-- | common/Wizcommon.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/common/Wizcommon.pm b/common/Wizcommon.pm index 43971713..7e58107a 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 test_host_domain); +our @EXPORT = qw(check_started check_starts_on_boot test_host_domain); my $net; @@ -51,6 +51,16 @@ sub check_started { } } +sub check_starts_on_boot($$) { + my ($in, $servicename) = @_; + if (!services::starts_on_boot($servicename)) { + my $start_service = $in->ask_yesorno(N("Start %s server on boot", $servicename), N("Would you like to start the %s service automatically on every boot?", $servicename), 1); + if ($start_service) { + services::start_service_on_boot($servicename); + } + } +} + sub test_host_domain { my ($SHORTHOSTNAME, $DOMAINNAME) = @_; if ($SHORTHOSTNAME =~ /localhost/) { |