From ded4414ef47a3ada632478ad16cad06d9c302c3d Mon Sep 17 00:00:00 2001 From: Greg Brockman Date: Sat, 31 Oct 2015 18:27:55 -0700 Subject: [PATCH] Respect the -D flag It looks like edfbffb85f4684b87a906c6c1f1aeba6aaf870aa caused the OVPN_DNS variable to start being ignored, meaning the -D flag was a no-op. --- bin/ovpn_genconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/ovpn_genconfig b/bin/ovpn_genconfig index e0f2139..558d907 100755 --- a/bin/ovpn_genconfig +++ b/bin/ovpn_genconfig @@ -211,7 +211,8 @@ EOF [ -n "$OVPN_AUTH" ] && echo "auth $OVPN_AUTH" >> "$conf" [ -n "$OVPN_CLIENT_TO_CLIENT" ] && echo "client-to-client" >> "$conf" -for i in "${OVPN_DNS_SERVERS[@]}"; do + +[ "$OVPN_DNS" == "1" ] && for i in "${OVPN_DNS_SERVERS[@]}"; do echo "push dhcp-option DNS $i" >> "$conf" done # Append Routes