summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2004-02-06 11:51:25 +0000
committerAntoine Ginies <aginies@mandriva.com>2004-02-06 11:51:25 +0000
commita6ba85f1a4eb5491b6c6a692f49c216e95215686 (patch)
treef63396937cc9869114d26e153d858360b0340c1b
parentcb0945dd8c95a9776999dffafe72b07100c890a8 (diff)
downloaddrakwizard-a6ba85f1a4eb5491b6c6a692f49c216e95215686.tar
drakwizard-a6ba85f1a4eb5491b6c6a692f49c216e95215686.tar.gz
drakwizard-a6ba85f1a4eb5491b6c6a692f49c216e95215686.tar.bz2
drakwizard-a6ba85f1a4eb5491b6c6a692f49c216e95215686.tar.xz
drakwizard-a6ba85f1a4eb5491b6c6a692f49c216e95215686.zip
add check_started to check if service has been started or not
-rw-r--r--common/Wizcommon.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/Wizcommon.pm b/common/Wizcommon.pm
index 881c2553..aa53865c 100644
--- a/common/Wizcommon.pm
+++ b/common/Wizcommon.pm
@@ -20,8 +20,12 @@
package MDK::Wizard::Wizcommon;
use strict;
+use MDK::Common;
use MDK::Wizard::IFCFG;
+our @ISA = qw(Exporter);
+our @EXPORT = qw(check_started);
+
my $net;
sub check_dhcp {
@@ -36,4 +40,12 @@ sub new {
}, $class;
}
+sub check_started {
+ my ($service) = @_;
+ my ($isrunning) = chomp_(`pidof $service`) =~ /(\d+)/m;
+ if (!$isrunning) {
+ return 'error_end'
+ }
+}
+
1