modules.lxc.running_systemd: use command -v not which

Fixes #30676.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
This commit is contained in:
Justin Findlay 2016-01-29 12:26:34 -07:00
parent 36db0f99ed
commit f8f867570f

View file

@ -3188,7 +3188,7 @@ def running_systemd(name, cache=True, path=None):
'''\
#!/usr/bin/env bash
set -x
if ! which systemctl 1>/dev/null 2>/dev/null;then exit 2;fi
if ! command -v systemctl 1>/dev/null 2>/dev/null;then exit 2;fi
for i in \\
/run/systemd/journal/dev-log\\
/run/systemd/journal/flushed\\