diff -Nur e-smith-lib-2.6.0.old/root/etc/e-smith/events/actions/adjust-services e-smith-lib-2.6.0/root/etc/e-smith/events/actions/adjust-services --- e-smith-lib-2.6.0.old/root/etc/e-smith/events/actions/adjust-services 2021-01-01 17:54:05.634000000 -0500 +++ e-smith-lib-2.6.0/root/etc/e-smith/events/actions/adjust-services 2021-01-01 18:00:37.726000000 -0500 @@ -129,10 +129,10 @@ else { my $enabled = ($s->prop('status') || 'disabled') eq 'enabled'; - # stop the service if it is now disabled - unshift(@actions,'stop') unless $enabled; - # bring the service up if it is enabled (and we're not stopping it or running it once) - push(@actions,'start') if ($enabled && !grep { /^(down|stop|d|once|o|start|restart|reload-or-restart)$/ } @actions) ; + # bring the service up if it is enabled (and we're not stopping it or running it once, or using signal able to start it) + unshift(@actions,'start') if ($enabled && !grep { /^(down|stop|d|once|o|start|restart|reload-or-restart)$/ } @actions) ; + # stop the service if it is disabled + @actions = ('stop') unless $enabled; foreach (@actions) { warn "adjusting non-supervised $service ($_)\n"; 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 --- e-smith-lib-2.6.0.old/root/usr/share/perl5/vendor_perl/esmith/util.pm 2021-01-01 17:54:05.636000000 -0500 +++ e-smith-lib-2.6.0/root/usr/share/perl5/vendor_perl/esmith/util.pm 2021-01-01 18:14:35.366000000 -0500 @@ -1119,7 +1119,7 @@ die "serviceControl: ACTION must be specified"; } - if ( $serviceAction =~ /^(start|stop|restart|reload|graceful|adjust|svdisable|reload-or-restart|try-restart|try-reload-or-restart|enable -now|sigterm|sighup|sigusr1|sigusr2)$/ ) + if ( $serviceAction =~ /^(start|stop|restart|reload|graceful|adjust|svdisable|reload-or-restart|try-restart|reload-or-try-restart|enable -now|enable|disable|sig[A-Za-z12]+)$/ ) { my ($startScript) = glob("/etc/rc.d/rc7.d/S*$serviceName") ||'' ; my ($systemdScript) = "/usr/lib/systemd/system/$serviceName.service" ||''; @@ -1133,9 +1133,15 @@ if (-e $systemdScript and ! -e $startScript){ # systemd is not aware of adjust, sigusr1, sigusr2, sigterm, sighup - $serviceAction = ( $serviceAction =~/^(adjust|graceful|sighup|sigusr1|sigusr2)$/ ) ? "reload" : $serviceAction; - $serviceAction = ( $serviceAction eq "sigterm" ) ? "restart" : $serviceAction; - if ($serviceAction =~/^(start|stop|restart|reload|reload-or-restart|try-restart|try-reload-or-restart|enable -now)$/) { + $serviceAction = ( $serviceAction =~/^(adjust|graceful|sighup|sigusr1|sigusr2)$/ ) ? "reload-or-restart" : $serviceAction; + $serviceAction = ( $serviceAction eq "sigterm" ) ? "restart" : $serviceAction; + if ($serviceAction =~/^(sig[A-Za-z12]+)$/) { + $serviceAction=uc($serviceAction); + system('/usr/bin/systemctl',"kill","--signal=$serviceAction","$serviceName.service") == '0' + || warn "serviceControl: Couldn't " . + "system( /usr/bin/systemctl kill --signal=$serviceAction $serviceName.service): $!\n"; + } + elsif ($serviceAction =~/^(start|stop|restart|reload|reload-or-restart|try-restart|reload-or-try-restart|enable -now|enable|disable)$/) { system('/usr/bin/systemctl',"$serviceAction","$serviceName.service") == '0' || warn "serviceControl: Couldn't " . "system( /usr/bin/systemctl $serviceAction $serviceName.service): $!\n"; @@ -1148,7 +1153,7 @@ elsif (-e $startScript) { my $background = $params{'BACKGROUND'} || 'false'; - die "serviceControl: Unknown serviceAction $serviceAction" if ($serviceAction =~/^(reload-or-restart|try-restart|try-reload-or-restart|enable -now)$/); + die "serviceControl: Unknown serviceAction $serviceAction" if ($serviceAction =~/^(reload-or-restart|try-restart|reload-or-try-restart|enable -now|enable|disable)$/); if ( $background eq 'true' ) { backgroundCommand( 0, $startScript, $serviceAction );