openvpn init script does not include cd in command_args if config does not include.
After upgrading from Alpine 3.7 to 3.8, the openvpn init script fails to start with the same config. It errors out with the error “No such file or directory (errno=2)” for all of the key files referenced in the config.
File openvpn.initd was rewritten in commit 4a66978d, which is causing the problem. If the openvpn config file does not include the “cd” parameter, the new init script does not include the “cd” parameter to the default $cfgdir.
Should line 102 @ https://github.com/alpinelinux/aports/blob/master/main/openvpn/openvpn.initd include the ! not modifier?
Current:
if cfgfile_has_option “cd”; then
command_args=“$command_args —cd $cfgdir”
fi
Proposed:
if ! cfgfile_has_option “cd”; then
command_args=“$command_args —cd $cfgdir”
fi
(from redmine: issue id 10028, created on 2019-02-23)