Hi P

On 09.12.2016 23.34, p.wa...@gmx.at wrote:
What about doing the 'correct' quotation in the init script?
I.e. removing the 'push' option from the append_params list
and instead do the workaround for quoatition there.

Thanks for making me rethink this. I thought about it when I worked on this yesterday, couldn't figure out how, rethought it now that you asked, and figured I could just add a check for $p in append_params() in openvpn.init (patch format only for clarity, will submit properly if this fix is better):

--- a/package/network/services/openvpn/files/openvpn.init
+++ b/package/network/services/openvpn/files/openvpn.init
@@ -42,7 +42,8 @@ append_params() {
                config_get v "$s" "$p"
                IFS="$LIST_SEP"
                for v in $v; do
- [ -n "$v" ] && append_param "$s" "$p" && echo " $v" >> "/var/etc/openvpn-$s.conf" + [ -n "$v" ] && [ "$p" != "push" ] && append_param "$s" "$p" && echo " $v" >> "/var/etc/openvpn-$s.conf" + [ -n "$v" ] && [ "$p" == "push" ] && append_param "$s" "$p" && echo " \"$v\"" >> "/var/etc/openvpn-$s.conf"
                done
                unset IFS
        done

This works, and at least I consider this cleaner than writing a special function for push parameters in openvpn.init.

/Magnus

Best regards,
P. Wassi


_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to