From 64bf5882db3c1e48e953b2248f5824970f0fcb5b Mon Sep 17 00:00:00 2001 From: Tuomo Soini Date: Thu, 16 Apr 2020 23:29:19 +0300 Subject: [PATCH] ifupdown: only handle up and down state changes Signed-off-by: Tuomo Soini Signed-off-by: Tom Eastep --- Shorewall-init/ifupdown.fedora.sh | 9 ++++++++- Shorewall-init/ifupdown.suse.sh | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Shorewall-init/ifupdown.fedora.sh b/Shorewall-init/ifupdown.fedora.sh index 9fdd1e1f2..667a2db5c 100644 --- a/Shorewall-init/ifupdown.fedora.sh +++ b/Shorewall-init/ifupdown.fedora.sh @@ -90,7 +90,14 @@ case $0 in COMMAND=down ;; *dispatcher.d*) - COMMAND="$2" + case "$2" in + up|down) + COMMAND="$2" + ;; + *) + exit 0 + ;; + esac ;; *) exit 0 diff --git a/Shorewall-init/ifupdown.suse.sh b/Shorewall-init/ifupdown.suse.sh index d5e9ca577..2ea3bba1c 100644 --- a/Shorewall-init/ifupdown.suse.sh +++ b/Shorewall-init/ifupdown.suse.sh @@ -120,7 +120,14 @@ case $0 in case $0 in *dispatcher.d*) INTERFACE="$1" - COMMAND="$2" + case "$2" in + up|down) + COMMAND="$2" + ;; + *) + exit 0 + ;; + esac ;; *if-up.d*) COMMAND=up