The OpenVPN package uses `list' in its /etc/config/openvpn file. In most cases, this works just fine.
But when you run "/etc/init.d/openvpn restart", the decomposition of "restart" into "stop" and "start" causes the config file to be processed twice, so the list elements get added twice. E.g. if in the openvpn config file you have list push "route aa.bb.cc.dd" you'll end up passing that argument 'push "route aa.bb.cc.dd"' twice to the process. The patch below seems to fix it for my use, but I'm not sure if the bug is in openvpn.init or in /etc/functions.sh or ... Stefan diff --git a/net/openvpn/files/openvpn.init b/net/openvpn/files/openvpn.init old mode 100644 new mode 100755 index bdf0413..aba8cbb --- a/net/openvpn/files/openvpn.init +++ b/net/openvpn/files/openvpn.init @@ -142,7 +142,9 @@ reload() { } restart() { - stop; sleep 5; start + # Run `stop' in a subprocess, because otherwise we + # read the config file twice, so we get the "list"s doubled up. + (stop); sleep 5; start } up() { _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel