Skip to content

Commit

Permalink
Do a reload by default when running
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Jan 9, 2019
1 parent 78c1beb commit cb002c6
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/lib/y2firewall/dialogs/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def initialize
Yast::NetworkInterfaces.Read
fw.read unless fw.read?
end
fw.system_service.reload if fw.system_service && fw.system_service.running?
end

def should_open_dialog?
Expand Down Expand Up @@ -130,17 +131,6 @@ def swap_api
# modifications
def apply_changes
return false if Yast::Mode.config
# Firewall settings will be written into the permanent configurations only.
# So the running firewalld service will not be changed. Even a reload does
# not help (see man pages). So the running firewalld service has to be
# restarted.
# Set a flag only. Restarting will be done by system_service.save.
if fw.modified? && # Data has been changed by user
fw.system_service.running? && # The service is already running
fw.system_service.action != :stop # and will not be stopped by the user
fw.system_service.restart
end

fw.write_only
fw.system_service.save
end
Expand Down

0 comments on commit cb002c6

Please sign in to comment.