Skip to content

Commit

Permalink
Merge pull request #765 from joseivanlopez/backport_changes
Browse files Browse the repository at this point in the history
Backport changes
  • Loading branch information
joseivanlopez committed Jul 17, 2018
2 parents 754a121 + 4020a2e commit fa8d019
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions library/network/src/lib/y2firewall/firewalld/api.rb
Expand Up @@ -103,9 +103,13 @@ def disable!
offline? ? run_command("--disable") : Yast::Service.Disable("firewalld")
end

# @return [Boolean] The firewalld service state (exit code)
# Return the current state of the firewalld service (running or not
# running)
#
# @return [String] firewalld service state
# @see http://www.firewalld.org/documentation/man-pages/firewall-cmd.html
def state
case Yast::Execute.on_target("firewallctl", "state", allowed_exitstatus: [0, 252])
case Yast::Execute.on_target("firewall-cmd", "--state", allowed_exitstatus: [0, 252])
when 0
"running"
when 252
Expand Down
6 changes: 6 additions & 0 deletions package/yast2.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jul 16 09:12:23 UTC 2018 - knut.anderssen@suse.com

- Replace the deprecated firewallctl command with firewall-cmd for
obtaining the firewalld state (bsc#1093111)

-------------------------------------------------------------------
Tue Jul 3 08:01:07 UTC 2018 - knut.anderssen@suse.com

Expand Down

0 comments on commit fa8d019

Please sign in to comment.