From 8612f9f3c371631fa33a4279bdad20c0d31d6c7c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 16 Oct 2014 21:20:57 +0200 Subject: ignore tun/tap interfaces --- 40-openvpn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '40-openvpn') diff --git a/40-openvpn b/40-openvpn index 3df20dd..502dc6b 100755 --- a/40-openvpn +++ b/40-openvpn @@ -3,6 +3,13 @@ INTERFACE="${1}" STATUS="${2}" +# VPN interfaces managed by networkmanager send events vpn-{up,down}. +# If the connection is started by whatever networkmanager sees this +# and triggers event up or down. Ignore these. +if ! ip tuntap | grep -q "^${INTERFACE}:"; then + exit 0 +fi + if [ "${STATUS}" == "up" ]; then if pgrep -x openvpn >/dev/null; then kill -USR1 $(pgrep -x openvpn) -- cgit v1.2.3-70-g09d2