From 43ae3eb61dd92fccc9c6d971883551823628ddd5 Mon Sep 17 00:00:00 2001 From: omriiluz Date: Sat, 28 Feb 2015 03:22:08 -0800 Subject: [PATCH] properly clone arrays --- bin/ovpn_genconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ovpn_genconfig b/bin/ovpn_genconfig index faea108..463e537 100755 --- a/bin/ovpn_genconfig +++ b/bin/ovpn_genconfig @@ -111,10 +111,10 @@ while getopts ":r:s:du:cp:DNm:" opt; do done # if new routes were not defined with -r, use default -[ ${#TMP_ROUTES[@]} -gt 0 ] && OVPN_ROUTES=${TMP_ROUTES[@]} +[ ${#TMP_ROUTES[@]} -gt 0 ] && OVPN_ROUTES=("${TMP_ROUTES[@]}") # if new push directives were not defined with -p, use default -[ ${#TMP_PUSH[@]} -gt 0 ] && OVPN_PUSH=${TMP_PUSH[@]} +[ ${#TMP_PUSH[@]} -gt 0 ] && OVPN_PUSH=("${TMP_PUSH[@]}") # Server name is in the form "udp://vpn.example.com:1194" if [[ "$OVPN_SERVER_URL" =~ ^((udp|tcp)://)?([0-9a-zA-Z\.\-]+)(:([0-9]+))?$ ]]; then