From 592c9bbdbcaf6f8a9ba89b27c76aa3ffa913c9b5 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 18 May 2010 12:49:09 -0700 Subject: [PATCH] Integrate Shorewall-init with NetworkManager on RedHat Signed-off-by: Tom Eastep --- Shorewall-init/ifupdown.sh | 3 +++ Shorewall-init/install.sh | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/Shorewall-init/ifupdown.sh b/Shorewall-init/ifupdown.sh index d5a1bc8be..36bee6ea2 100644 --- a/Shorewall-init/ifupdown.sh +++ b/Shorewall-init/ifupdown.sh @@ -80,6 +80,9 @@ else *ifdown*) COMMAND=down ;; + *dispatch.d*) + COMMAND="$2" + ;; *) exit 0 ;; diff --git a/Shorewall-init/install.sh b/Shorewall-init/install.sh index 04efe5fa1..460e7dd60 100755 --- a/Shorewall-init/install.sh +++ b/Shorewall-init/install.sh @@ -250,6 +250,13 @@ if [ -z "$PREFIX" ]; then ln -s /usr/share/shorewall-init/ifupdown /sbin/ifup-local ln -s /usr/share/shorewall-init/ifupdown /sbin/ifdown-local fi + + if [ -d /etc/NetworkManager/dispatch.d ]; then + # + # RedHat doesn't integrate ifup/ifdown-local with NetworkManager + # + ln -s /usr/share/shorewall-init/ifupdown /etc/NetworkManager/dispatch.d/shorewall + fi fi if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then