Class: Yast::InstRestoreSettingsClient

Inherits:
Client
  • Object
show all
Defined in:
src/lib/installation/clients/inst_restore_settings.rb

Instance Method Summary collapse

Instance Method Details

#mainObject



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'src/lib/installation/clients/inst_restore_settings.rb', line 29

def main
  Yast.import "UI"

  textdomain "installation"

  Yast.import "GetInstArgs"
  Yast.import "Service"
  Yast.import "NetworkInterfaces"
  Yast.import "SuSEFirewall"

  return :back if GetInstArgs.going_back

  Builtins.foreach(["network"]) do |service|
    if Service.Enabled(service) && Service.Status(service) != 0
      # TRANSLATORS: busy message
      UI.OpenDialog(
        Label(Builtins.sformat(_("Starting service %1..."), service))
      )

      # This might take a lot of time if case of DHCP, for instance
      Service.RunInitScriptWithTimeOut(service, "start")

      UI.CloseDialog
    end
  end

  NetworkInterfaces.Read

  :auto

  # EOF
end