]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
t_client.sh.in: Do not run resolvectl if systemd is not running
authorFrank Lichtenheld <frank@lichtenheld.com>
Mon, 13 Jul 2026 15:18:11 +0000 (17:18 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 14 Jul 2026 09:34:09 +0000 (11:34 +0200)
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>
tests/t_client.sh.in

index 48e24462417e8ba624b534e3cd9b0958c1608447..7233187f8a26f8681cb48585eb370416d757301e 100755 (executable)
@@ -209,7 +209,7 @@ get_ifconfig_route()
     # 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