Blame SOURCES/firewalld-0.3.9-RHBZ#1054289_80946eb1.patch
|
|
36ae71 |
commit 80946eb1f78c7cab565742576a5d877acddb355c
|
|
|
36ae71 |
Author: Jiri Popelka <jpopelka@redhat.com>
|
|
|
36ae71 |
Date: Tue Jan 14 16:19:02 2014 +0100
|
|
|
36ae71 |
|
|
|
36ae71 |
firewall-cmd: show output on '--quiet --direct --passthrough'
|
|
|
36ae71 |
|
|
|
36ae71 |
'--direct --passthrough' is special, because we don't know beforehand
|
|
|
36ae71 |
whether it will 'do' or 'show' something, i.e. whether we will
|
|
|
36ae71 |
show only status ('do something' case) or
|
|
|
36ae71 |
show only output of command and no status ('show something' case).
|
|
|
36ae71 |
|
|
|
36ae71 |
diff --git a/src/firewall-cmd b/src/firewall-cmd
|
|
|
36ae71 |
index fc52cd0..bdb7dbe 100755
|
|
|
36ae71 |
--- a/src/firewall-cmd
|
|
|
36ae71 |
+++ b/src/firewall-cmd
|
|
|
36ae71 |
@@ -1,7 +1,7 @@
|
|
|
36ae71 |
#!/usr/bin/python
|
|
|
36ae71 |
# -*- coding: utf-8 -*-
|
|
|
36ae71 |
#
|
|
|
36ae71 |
-# Copyright (C) 2009-2013 Red Hat, Inc.
|
|
|
36ae71 |
+# Copyright (C) 2009-2014 Red Hat, Inc.
|
|
|
36ae71 |
#
|
|
|
36ae71 |
# Authors:
|
|
|
36ae71 |
# Thomas Woerner <twoerner@redhat.com>
|
|
|
36ae71 |
@@ -958,7 +958,9 @@ elif a.direct:
|
|
|
36ae71 |
if a.passthrough:
|
|
|
36ae71 |
if len (a.passthrough) < 2:
|
|
|
36ae71 |
__fail("usage: --direct --passthrough { ipv4 | ipv6 | eb } <args>")
|
|
|
36ae71 |
- __print(fw.passthrough(_check_ipv(a.passthrough[0]), a.passthrough[1:]))
|
|
|
36ae71 |
+ msg = fw.passthrough(_check_ipv(a.passthrough[0]), a.passthrough[1:])
|
|
|
36ae71 |
+ if msg:
|
|
|
36ae71 |
+ print(msg)
|
|
|
36ae71 |
elif a.add_chain:
|
|
|
36ae71 |
fw.addChain(_check_ipv(a.add_chain[0]), a.add_chain[1], a.add_chain[2])
|
|
|
36ae71 |
elif a.remove_chain:
|