Skip to content

Commit

Permalink
Replace SuSEFirewall2 by firewalld
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Feb 8, 2019
1 parent 93920be commit 3cd60c0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
7 changes: 7 additions & 0 deletions package/yast2-packager.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Feb 8 17:21:41 UTC 2019 - knut.anderssen@suse.com

- Replaced SuSEFirewall2 by firewalld when checking if the firewall
is running and thus maybe blocking SLP discovery (fate#323460)
- 4.1.26

-------------------------------------------------------------------
Tue Jan 29 08:08:04 UTC 2019 - dgonzalez@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-packager.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-packager
Version: 4.1.25
Version: 4.1.26
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
10 changes: 7 additions & 3 deletions src/modules/SourceManagerSLP.rb
@@ -1,5 +1,6 @@
# encoding: utf-8
require "yast"
require "y2firewall/firewalld"

# YaST Namespace
module Yast
Expand All @@ -12,7 +13,6 @@ def main
Yast.import "Wizard"
Yast.import "Directory"
Yast.import "Stage"
Yast.import "SuSEFirewall"
Yast.import "Report"
Yast.import "Label"
# import "IP";
Expand Down Expand Up @@ -541,12 +541,12 @@ def SelectOneSLPService
# no servers found
if slp_services_found.nil? || Builtins.size(slp_services_found).zero?
Builtins.y2warning("No SLP repositories were found")
if !Stage.initial && SuSEFirewall.IsStarted
if !Stage.initial && firewalld.running?
Report.Message(
# error popup
_(
"No SLP repositories have been found on your network.\n" \
"This could be caused by a running SuSEfirewall2,\n" \
"This could be caused by a running firewall,\n" \
"which probably blocks the network scanning."
)
)
Expand Down Expand Up @@ -580,6 +580,10 @@ def AddSourceTypeSLP
url
end

def firewalld
Y2Firewall::Firewalld.instance
end

publish function: :SelectOneSLPService, type: "string ()"
publish function: :AddSourceTypeSLP, type: "string ()"
end
Expand Down

0 comments on commit 3cd60c0

Please sign in to comment.