1 |
diff -Nur e-smith-lib-2.6.0.old/root/usr/share/perl5/vendor_perl/esmith/util.pm e-smith-lib-2.6.0/root/usr/share/perl5/vendor_perl/esmith/util.pm |
2 |
--- e-smith-lib-2.6.0.old/root/usr/share/perl5/vendor_perl/esmith/util.pm 2019-12-12 01:52:32.059000000 -0500 |
3 |
+++ e-smith-lib-2.6.0/root/usr/share/perl5/vendor_perl/esmith/util.pm 2019-12-12 01:54:07.356000000 -0500 |
4 |
@@ -1119,7 +1119,7 @@ |
5 |
die "serviceControl: ACTION must be specified"; |
6 |
} |
7 |
|
8 |
- if ( $serviceAction =~ /^(start|stop|restart|reload|graceful|adjust|svdisable)$/ ) |
9 |
+ if ( $serviceAction =~ /^(start|stop|restart|reload|graceful|adjust|svdisable|reload-or-restart|try-restart|enable -now)$/ ) |
10 |
{ |
11 |
my ($startScript) = glob("/etc/rc.d/rc7.d/S*$serviceName") ||'' ; |
12 |
my ($systemdScript) = "/usr/lib/systemd/system/$serviceName.service" ||''; |
13 |
@@ -1132,7 +1132,7 @@ |
14 |
} |
15 |
|
16 |
if (-e $systemdScript and ! -e $startScript){ |
17 |
- if ($serviceAction =~/^(start|stop|restart|reload)$/) { |
18 |
+ if ($serviceAction =~/^(start|stop|restart|reload|reload-or-restart|try-restart|enable -now)$/) { |
19 |
system('/usr/bin/systemctl',"$serviceAction","$serviceName.service") == '0' |
20 |
|| warn "serviceControl: Couldn't " . |
21 |
"system( /usr/bin/systemctl $serviceAction $serviceName.service): $!\n"; |
22 |
@@ -1145,6 +1145,7 @@ |
23 |
elsif (-e $startScript) { |
24 |
my $background = $params{'BACKGROUND'} || 'false'; |
25 |
|
26 |
+ die "serviceControl: Unknown serviceAction $serviceAction" if ($serviceAction =~/^(reload-or-restart|try-restart|enable -now)$/); |
27 |
if ( $background eq 'true' ) |
28 |
{ |
29 |
backgroundCommand( 0, $startScript, $serviceAction ); |