/[smeserver]/rpms/e-smith-lib/sme10/e-smith-lib-2.6.0.bz10848.systemctl-reload-or-restart.patch
ViewVC logotype

Annotation of /rpms/e-smith-lib/sme10/e-smith-lib-2.6.0.bz10848.systemctl-reload-or-restart.patch

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


Revision 1.1 - (hide annotations) (download)
Thu Dec 12 06:57:41 2019 UTC (4 years, 10 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-lib-2_6_0-15_el7_sme, e-smith-lib-2_6_0-13_el7_sme, e-smith-lib-2_6_0-16_el7_sme, e-smith-lib-2_6_0-10_el7_sme, e-smith-lib-2_6_0-17_el7_sme, e-smith-lib-2_6_0-11_el7_sme, e-smith-lib-2_6_0-14_el7_sme, e-smith-lib-2_6_0-9_el7_sme, e-smith-lib-2_6_0-12_el7_sme, HEAD
* Thu Dec 12 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-9.sme
- add support for systemctl reload-or-restart, try-restart, enable -now  [SME: 10848]

1 jpp 1.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 );

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