Class: Yast::InstLanClient

Inherits:
Client
  • Object
show all
Includes:
Logger
Defined in:
src/lib/network/clients/inst_lan.rb

Overview

Client for configuring the network during installation.

If the network configuration is managed by NetworkManager or some connection config is already present the client skip the configuration sequence.

The configuration sequence can be forced passing the 'skip_detection' argument. Additionally, the abort button could be hide passing the 'hide_abort_button' argument

the abort button Yast::WFM.CallFunction( "inst_lan", [args.merge("skip_detection" => true, "hide_abort_button" => true)] )

Examples:

calling the client forcing the configuration sequence and hiding

firsboot xml forcing the configuration sequence

<module>
  <label>Network</label>
   <name>inst_lan</name>
   <arguments>
     <skip_detection>true</skip_detection>
   </arguments>
</module>

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeInstLanClient

Returns a new instance of InstLanClient.



61
62
63
64
65
66
# File 'src/lib/network/clients/inst_lan.rb', line 61

def initialize
  super
  textdomain "network"

  Yast.include self, "network/lan/wizards.rb"
end

Class Attribute Details

.configuredObject

Returns the value of attribute configured.



58
59
60
# File 'src/lib/network/clients/inst_lan.rb', line 58

def configured
  @configured
end

Instance Method Details

#mainObject



68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'src/lib/network/clients/inst_lan.rb', line 68

def main
  log_and_return do
    manual_conf_request = GetInstArgs.argmap["skip_detection"] || false
    log.info("Lan module forces manual configuration: #{manual_conf_request}")

    if manual_conf_request
      LanSequence()
    else
      log.info("Configured network found: #{network_configured?}")
      network_configured? ? :auto : LanSequence()
    end
  end
end