diff options
author | Robert Schweikert <rjschwei@suse.com> | 2022-03-01 03:39:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-01 09:39:14 +0100 |
commit | 3642ed7c63fbd2fb67630b21efdb321c7e99b913 (patch) | |
tree | 994f2c0922ed2b08edad210d81d4bd3d27eb2a7d /cloudinit/analyze | |
parent | f106b2f78e36c464158672b18b64f89ca63b709a (diff) | |
download | cloud-init-git-3642ed7c63fbd2fb67630b21efdb321c7e99b913.tar.gz |
Stop hardcoding systemctl location (#1278)
Expect that "systemctl" is found in the PATH. Using the '/bin' prefix
is very distribution specific. A number of distributions are moving
all executables from '/' to '/usr'.
Diffstat (limited to 'cloudinit/analyze')
-rw-r--r-- | cloudinit/analyze/show.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/analyze/show.py b/cloudinit/analyze/show.py index 5fd9cdfd..e1e340ce 100644 --- a/cloudinit/analyze/show.py +++ b/cloudinit/analyze/show.py @@ -139,7 +139,7 @@ class SystemctlReader(object): def __init__(self, property, parameter=None): self.epoch = None - self.args = ["/bin/systemctl", "show"] + self.args = [subp.which("systemctl"), "show"] if parameter: self.args.append(parameter) self.args.extend(["-p", property]) |