Skip to content

Commit

Permalink
do not restart network if it is an installation via ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Jul 10, 2014
1 parent b755d78 commit f51ea45
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions library/network/src/modules/NetworkService.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def main
Yast.import "Mode"
Yast.import "Stage"
Yast.import "PackageSystem"
Yast.import "Linuxrc"

textdomain "base"

Expand Down Expand Up @@ -406,12 +407,17 @@ def systemctl_restart
# systemctl is available
def systemctl_reload_restart
if IsActive()
if Modified()
# reload is not sufficient
systemctl_restart
else
# reload may be unsupported
RunSystemCtl("network", "reload-or-try-restart")
unless Linuxrc.usessh
# Second stage has been called by yast.ssh via
# ssh. So we should not restart network cause systemctl
# hangs in that case. (bnc#885640)
if Modified()
# reload is not sufficient
systemctl_restart
else
# reload may be unsupported
RunSystemCtl("network", "reload-or-try-restart")
end
end
else
# always stop, it does not hurt if the net was stopped.
Expand Down

0 comments on commit f51ea45

Please sign in to comment.