OpenVPN: bug in /etc/hotplug.d/iface/42-openvpn
This file was added as a part of https://gitlab.labs.nic.cz/turris/turris-os-packages/-/merge_requests/148 .
$ ACTION=ifup DEVICE=pppoe-wan /etc/hotplug.d/iface/42-openvpn /etc/hotplug.d/iface/42-openvpn: line 24: [: service_is_running: unary operator expected
And I see these errors in syslog every time I connect to the internet/restart network.
The test command (
[) is misused: https://gitlab.labs.nic.cz/turris/turris-os-packages/-/blob/master/net/openvpn-hotplug/files/openvpn.hotplug#L24 . The
if should use directly the command without the test command - this is how
if works. The current behavior results in
if [ 0 ], which is incorrect syntax.
Change line 24 to
if service_is_running "openvpn" &&
and the script will work.