mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix systemd.enabled on Rocky 8
This commit is contained in:
parent
786db9bbbb
commit
1a97786516
1 changed files with 4 additions and 1 deletions
|
@ -172,7 +172,10 @@ def _pid_to_service_systemctl(pid):
|
||||||
systemd_cmd = ["systemctl", "--output", "json", "status", str(pid)]
|
systemd_cmd = ["systemctl", "--output", "json", "status", str(pid)]
|
||||||
try:
|
try:
|
||||||
systemd_output = subprocess.run(
|
systemd_output = subprocess.run(
|
||||||
systemd_cmd, check=True, text=True, capture_output=True
|
systemd_cmd,
|
||||||
|
check=True,
|
||||||
|
text=True,
|
||||||
|
capture_output=True,
|
||||||
)
|
)
|
||||||
status_json = salt.utils.json.find_json(systemd_output.stdout)
|
status_json = salt.utils.json.find_json(systemd_output.stdout)
|
||||||
except (ValueError, subprocess.CalledProcessError):
|
except (ValueError, subprocess.CalledProcessError):
|
||||||
|
|
Loading…
Add table
Reference in a new issue