In some cases we will have resolvectl installed but no
running systemd. E.g. on old Ubuntu distros resolvectl
is part of the main systemd package which we have installed
as a build-dependency.
Supress the warnings from resolvectl in this case.
Change-Id: I677d3206c24aad997889ed76fb8eca2e6f4b1259
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1778
Message-Id: <
20260713151816.22005-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg37566.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
# except Linux and MacOS
case $UNAME in
Linux)
- if [ -x /usr/bin/resolvectl ] ; then
+ if [ -x /usr/bin/resolvectl -a -d /run/systemd/system ] ; then
echo "-- linux resolvectl --"
resolvectl status
else