/[smeserver]/rpms/e-smith-lib/sme10/e-smith-lib-2.6.0-bz11177-signals.patch
ViewVC logotype

Diff of /rpms/e-smith-lib/sme10/e-smith-lib-2.6.0-bz11177-signals.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.2 by jpp, Fri Jan 1 23:28:42 2021 UTC Revision 1.3 by jpp, Sat Jan 2 06:45:26 2021 UTC
# Line 28  diff -Nur e-smith-lib-2.6.0.old/root/usr Line 28  diff -Nur e-smith-lib-2.6.0.old/root/usr
28       {       {
29           my ($startScript) = glob("/etc/rc.d/rc7.d/S*$serviceName") ||'' ;           my ($startScript) = glob("/etc/rc.d/rc7.d/S*$serviceName") ||'' ;
30           my ($systemdScript) = "/usr/lib/systemd/system/$serviceName.service" ||'';           my ($systemdScript) = "/usr/lib/systemd/system/$serviceName.service" ||'';
31  @@ -1133,9 +1133,14 @@  @@ -1133,9 +1133,15 @@
32    
33           if (-e $systemdScript and ! -e $startScript){           if (-e $systemdScript and ! -e $startScript){
34              # systemd is not aware of adjust, sigusr1, sigusr2, sigterm, sighup              # systemd is not aware of adjust, sigusr1, sigusr2, sigterm, sighup
35  -           $serviceAction = ( $serviceAction =~/^(adjust|graceful|sighup|sigusr1|sigusr2)$/ ) ? "reload" : $serviceAction;  -           $serviceAction = ( $serviceAction =~/^(adjust|graceful|sighup|sigusr1|sigusr2)$/ ) ? "reload" : $serviceAction;
36  -            $serviceAction = ( $serviceAction eq "sigterm" ) ? "restart" : $serviceAction;  -            $serviceAction = ( $serviceAction eq "sigterm" ) ? "restart" : $serviceAction;
37  -            if ($serviceAction =~/^(start|stop|restart|reload|reload-or-restart|try-restart|try-reload-or-restart|enable -now)$/) {  -            if ($serviceAction =~/^(start|stop|restart|reload|reload-or-restart|try-restart|try-reload-or-restart|enable -now)$/) {
38  +           $serviceAction = ( $serviceAction =~/^(adjust|graceful)$/ ) ? "reload" : $serviceAction;  +           $serviceAction = ( $serviceAction =~/^(adjust|graceful|sighup|sigusr1|sigusr2)$/ ) ? "reload-or-restart" : $serviceAction;
39    +           $serviceAction = ( $serviceAction eq "sigterm" ) ? "restart" : $serviceAction;
40  +           if ($serviceAction =~/^(sig[A-Za-z12]+)$/) {  +           if ($serviceAction =~/^(sig[A-Za-z12]+)$/) {
41  +               $serviceAction=uc($serviceAction);  +               $serviceAction=uc($serviceAction);
42  +               system('/usr/bin/systemctl',"kill","--signal=$serviceAction","$serviceName.service") == '0'  +               system('/usr/bin/systemctl',"kill","--signal=$serviceAction","$serviceName.service") == '0'


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed