From 202c173dd783036a09fa6de6e3a2409d4ea565d9 Mon Sep 17 00:00:00 2001 From: 4s3ti <4s3ti@4s3ti.net> Date: Sun, 4 Sep 2022 16:41:57 +0200 Subject: [PATCH] fix(openvpn): makeOVPN Missing space fix issue #1616 Add extra comments --- scripts/openvpn/makeOVPN.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/openvpn/makeOVPN.sh b/scripts/openvpn/makeOVPN.sh index 265614fa..b65396f7 100755 --- a/scripts/openvpn/makeOVPN.sh +++ b/scripts/openvpn/makeOVPN.sh @@ -475,8 +475,12 @@ for i in {2..254}; do || ! find /etc/openvpn/ccd -type f \ -exec grep -q "${NET_REDUCED}.${i}" {} +; then COUNT="${i}" - echo -n "ifconfig-push ${NET_REDUCED}.${i}" >> /etc/openvpn/ccd/"${NAME}" + echo -n "ifconfig-push ${NET_REDUCED}.${i} " >> /etc/openvpn/ccd/"${NAME}" + # The space after ${i} is important ------^! cidrToMask "${subnetClass}" >> /etc/openvpn/ccd/"${NAME}" + # the end resuld should be a line like: + # ifconfig-push ${NET_REDUCED}.${i} ${subnetClass} + # ifconfig-push 10.205.45.8 255.255.255.0 break fi done