From 713f6184481be52aeb291453de6331e37f83335b Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 3 Dec 2017 02:27:22 +0100 Subject: wg-quick: accept ancient iproute2 Some Android platforms have an older iproute2 that doesn't allow the type parameter in the show command. --- wg-quick.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- cgit v1.2.3-59-g8ed1b