Skip to content

Commit

Permalink
fix(openvpn): makeOVPN Missing space
Browse files Browse the repository at this point in the history
fix issue #1616
Add extra comments
  • Loading branch information
coolapso committed Sep 4, 2022
1 parent e7d06d0 commit 202c173
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/openvpn/makeOVPN.sh
Expand Up @@ -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
Expand Down

0 comments on commit 202c173

Please sign in to comment.