ifupdown: only handle up and down state changes

Signed-off-by: Tuomo Soini <tis@foobar.fi>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tuomo Soini 2020-04-16 23:29:19 +03:00 committed by Tom Eastep
parent 6841fc9eb2
commit 64bf5882db
2 changed files with 16 additions and 2 deletions

View File

@ -90,6 +90,8 @@ case $0 in
COMMAND=down
;;
*dispatcher.d*)
case "$2" in
up|down)
COMMAND="$2"
;;
*)
@ -97,6 +99,11 @@ case $0 in
;;
esac
;;
*)
exit 0
;;
esac
;;
esac
[ -n "$LOGFILE" ] || LOGFILE=/dev/null

View File

@ -120,8 +120,15 @@ case $0 in
case $0 in
*dispatcher.d*)
INTERFACE="$1"
case "$2" in
up|down)
COMMAND="$2"
;;
*)
exit 0
;;
esac
;;
*if-up.d*)
COMMAND=up
;;