/[smeserver]/rpms/e-smith-lib/sme10/e-smith-lib-2.6.0-bz12194-allowSystemctlAliases.patch
ViewVC logotype

Contents of /rpms/e-smith-lib/sme10/e-smith-lib-2.6.0-bz12194-allowSystemctlAliases.patch

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


Revision 1.1 - (show annotations) (download)
Wed Nov 23 22:07:12 2022 UTC (23 months, 1 week ago) by jpp
Branch: MAIN
CVS Tags: e-smith-lib-2_6_0-16_el7_sme, e-smith-lib-2_6_0-17_el7_sme, HEAD
Error occurred while calculating annotation data.
* Wed Nov 23 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-16.sme
- allow call to systemctl aliases in etc [SME: 12194]
  fix network=>networking service is not restarted.

1 diff -Nur --no-dereference 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 2022-11-23 17:02:16.800000000 -0500
3 +++ e-smith-lib-2.6.0/root/usr/share/perl5/vendor_perl/esmith/util.pm 2022-11-23 17:04:43.374000000 -0500
4 @@ -1123,17 +1123,18 @@
5 {
6 my ($startScript) = glob("/etc/rc.d/rc7.d/S*$serviceName") ||'' ;
7 my ($systemdScript) = "/usr/lib/systemd/system/$serviceName.service" ||'';
8 + my ($systemdAlias) = "/etc/systemd/system/$serviceName.service" ||'';
9 my $multiple = "$serviceName.service";
10 ($multiple = $serviceName ) =~ s/([a-zA-Z0-9\-_.]+@)(.*)/$1.service/ if ( $serviceName =~ /@/ );
11
12 - unless ( -e $startScript or -e $systemdScript or -e "/usr/lib/systemd/system/$multiple")
13 + unless ( -e $startScript or -e $systemdScript or -e "/usr/lib/systemd/system/$multiple" or -e $systemdAlias)
14 {
15 warn "serviceControl: startScript not found "
16 . "for service $serviceName\n";
17 return 0;
18 }
19
20 - if ( (-e $systemdScript or -e "/usr/lib/systemd/system/$multiple") and ! -e $startScript){
21 + if ( (-e $systemdScript or -e "/usr/lib/systemd/system/$multiple" or -e $systemdAlias) and ! -e $startScript){
22 # systemd is not aware of adjust, sigusr1, sigusr2, sigterm, sighup
23 $serviceAction = ( $serviceAction =~/^(adjust|graceful|sighup|sigusr1|sigusr2)$/ ) ? "reload-or-restart" : $serviceAction;
24 $serviceAction = ( $serviceAction eq "sigterm" ) ? "restart" : $serviceAction;

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