summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-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