aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-06-27 22:18:13 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-06-28 05:28:54 +0200
commit5e4da2d00e1def10bf5a19110f5a44cec780b495 (patch)
tree07aa9684dc720137389299ebd2b8b0706c5dacc4 /src
parentcompat: do not export symbols unnecessarily (diff)
downloadwireguard-monolithic-historical-5e4da2d00e1def10bf5a19110f5a44cec780b495.tar.xz
wireguard-monolithic-historical-5e4da2d00e1def10bf5a19110f5a44cec780b495.zip
wg-quick: use printf -v instead of namerefs for bash 4.2
I'm not happy about this.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tools/wg-quick.bash5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/wg-quick.bash b/src/tools/wg-quick.bash
index 6edcd3a..243f35d 100755
--- a/src/tools/wg-quick.bash
+++ b/src/tools/wg-quick.bash
@@ -54,10 +54,9 @@ parse_options() {
}
read_bool() {
- local -n out="$1"
case "$2" in
- true) out=1 ;;
- false) out=0 ;;
+ true) printf -v "$1" 1 ;;
+ false) printf -v "$1" 0 ;;
*) die "\`$2' is neither true nor false"
esac
}