vpnc-script: Detect systemd with resolvectl status

It appears that the "resolvectl status" command has been available since:

Ref: https://github.com/systemd/systemd/commit/c2e84cab3afb09e726be40ce80b6ce6129c8af32 Ref: https://github.com/systemd/systemd/commit/a7a4c60a253a181385764bcb542906a312b68fe9

which was first released in systemd v239 from June 2018.

systemd-resolve is usually symlinked to resolvectl, but it appears to be deprecated. This change will still fallback to trying systemd-resolve if resolvectl fails.

Merge request reports

Loading