diff options
author | David Kaspar [Dee'Kej] <dkaspar@redhat.com> | 2017-10-10 17:49:37 +0200 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2017-10-31 12:27:31 +0100 |
commit | e30b3c095221ebec965e9c78a78f694b6a7a3aa4 (patch) | |
tree | 6ceac909861668047a8cdf2b477bfb4942a2373b /sysconfig/network-scripts/ifup-post | |
parent | 72f4b40634ebd653bcebd124ae80ea1f46f04a76 (diff) | |
download | initscripts-e30b3c095221ebec965e9c78a78f694b6a7a3aa4.tar initscripts-e30b3c095221ebec965e9c78a78f694b6a7a3aa4.tar.gz initscripts-e30b3c095221ebec965e9c78a78f694b6a7a3aa4.tar.bz2 initscripts-e30b3c095221ebec965e9c78a78f694b6a7a3aa4.tar.xz initscripts-e30b3c095221ebec965e9c78a78f694b6a7a3aa4.zip |
network-scripts: firewall-cmd replaced with DBus calls
To speed things up. Based on patch & comments from:
https://bugzilla.redhat.com/show_bug.cgi?id=1497759
Diffstat (limited to 'sysconfig/network-scripts/ifup-post')
-rwxr-xr-x | sysconfig/network-scripts/ifup-post | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post index ab0710b3..7c028546 100755 --- a/sysconfig/network-scripts/ifup-post +++ b/sysconfig/network-scripts/ifup-post @@ -105,9 +105,12 @@ if [ "$2" = "boot" -a \ fi fi -# Inform firewall which network zone (empty means default) this interface belongs to -if [ -x /usr/bin/firewall-cmd -a "${REALDEVICE}" != "lo" ]; then - /usr/bin/firewall-cmd --zone="${ZONE}" --change-interface="${DEVICE}" > /dev/null 2>&1 +# Set firewall ZONE for this device (empty means default): +if [ "${REALDEVICE}" != "lo" ]; then + dbus-send --system --dest=org.fedoraproject.FirewallD1 \ + /org/fedoraproject/FirewallD1 \ + org.fedoraproject.FirewallD1.zone.changeZoneOfInterface \ + string:"${ZONE}" string:"${DEVICE}" fi # Notify programs that have requested notification |