Skip to contentSkip to conversation

Fix wg-tool regex parsing for non en_US locale

PATCH In review Arti Zirk 2 participants 2 messages Feb 5, 2017

lore
Share & tools
lore

Arti Zirk

author
#0 lore raw

PATCH 1/1 Fix wg-tool regex parsing for non en_US locale

On systems that have the default locale set to anything other than en_US or C will be unable to use wg-quick because regex rules use to make sure that the input interface name is a valid will fail. Forcing locale inside the script to C seems to fix that.

---
 src/tools/wg-quick.bash | 3 +++
 1 file changed, 3 insertions(+)
src/tools/wg-quick.bash +3 -0
index 5db3485..c4f0cfd 100755
@@ -6,6 +6,9 @@
 set -e -o pipefail
 shopt -s extglob
 
+# regex will change behavior based on the current locale, so lets set it to somehting that should work on most systems
+export LANG=C
+
 SELF="$(readlink -f "${BASH_SOURCE[0]}")"
 export PATH="${SELF%/*}:$PATH"
 
Signature · 1 line
2.11.1