aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-12-03 02:27:22 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-12-03 02:27:22 +0100
commit713f6184481be52aeb291453de6331e37f83335b (patch)
tree145b5ecde07821f22d992f8065c44bd0dd730f75
parentWork around snapdragon compiler bug (diff)
downloadandroid_kernel_wireguard-713f6184481be52aeb291453de6331e37f83335b.tar.xz
android_kernel_wireguard-713f6184481be52aeb291453de6331e37f83335b.zip
wg-quick: accept ancient iproute2
Some Android platforms have an older iproute2 that doesn't allow the type parameter in the show command.
-rw-r--r--wg-quick.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/wg-quick.bash b/wg-quick.bash
index b07037b..49b69f7 100644
--- a/wg-quick.bash
+++ b/wg-quick.bash
@@ -165,7 +165,7 @@ cmd_up() {
}
cmd_down() {
- [[ -n $(ip link show dev "$INTERFACE" type wireguard 2>/dev/null) ]] || die "\`$INTERFACE' is not a WireGuard interface"
+ [[ " $(wg show interfaces) " == *" $INTERFACE "* ]] || die "\`$INTERFACE' is not a WireGuard interface"
del_if
}