sys-cluster/pcs: modify patch openrc

Package-Manager: Portage-3.0.11, Repoman-3.0.2
Signed-off-by: Andrea Postiglione <andrea.postiglione@gmail.com>
This commit is contained in:
Andrea Postiglione
2020-12-06 18:38:19 +01:00
parent e7f5a02228
commit ff3c16a753

View File

@@ -18,7 +18,7 @@
cmd = ['systemctl', 'is-enabled', "#{service}.service"]
else
- cmd = ['chkconfig', service]
+ cmd = ['/usr/bin/rc-config','list default|/bin/grep -ow', service]
+ cmd = ['/usr/bin/rc-config','list default|/bin/grep -q', service]
end
_, _, retcode = run_cmd(PCSAuth.getSuperuserAuth(), *cmd)
return (retcode == 0)
@@ -27,7 +27,7 @@
cmd = ['systemctl', 'status', "#{service}.service"]
else
- cmd = ['service', service, 'status']
+ cmd = ['/bin/rc-status', 'default|/bin/grep started| /bin/grep -ow', service]
+ cmd = ['/bin/rc-status', 'default|/bin/grep started| /bin/grep -q', service]
end
_, _, retcode = run_cmd(PCSAuth.getSuperuserAuth(), *cmd)
return (retcode == 0)