Class: Installation::RemoteFinishClient
- Inherits:
-
Object
- Object
- Installation::RemoteFinishClient
- Includes:
- Yast::I18n, Yast::Logger
- Defined in:
- src/lib/installation/remote_finish_client.rb
Overview
Step of base installation finish for remote administration (VNC)
Instance Method Summary collapse
-
#enable_remote ⇒ Object
Enables remote access.
-
#initialize ⇒ RemoteFinishClient
constructor
A new instance of RemoteFinishClient.
-
#modes ⇒ Array<Symbol>
Modes in which #enable_remote should be called.
- #remote ⇒ Object
-
#run(*args) ⇒ Object
Executes the function passed as a first argument, to be called by WMF.CallFunction.
-
#title ⇒ Object
Text to display.
Constructor Details
#initialize ⇒ RemoteFinishClient
Returns a new instance of RemoteFinishClient.
25 26 27 28 |
# File 'src/lib/installation/remote_finish_client.rb', line 25 def initialize Yast.import "Linuxrc" textdomain "installation" end |
Instance Method Details
#enable_remote ⇒ Object
Enables remote access
76 77 78 79 |
# File 'src/lib/installation/remote_finish_client.rb', line 76 def enable_remote remote.enable! remote.write end |
#modes ⇒ Array<Symbol>
Modes in which #enable_remote should be called
71 72 73 |
# File 'src/lib/installation/remote_finish_client.rb', line 71 def modes Yast::Linuxrc.vnc ? [:installation, :autoinst] : [] end |
#remote ⇒ Object
81 82 83 |
# File 'src/lib/installation/remote_finish_client.rb', line 81 def remote @remote ||= Y2Remote::Remote.instance end |
#run(*args) ⇒ Object
Executes the function passed as a first argument, to be called by WMF.CallFunction
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 |
# File 'src/lib/installation/remote_finish_client.rb', line 32 def run(*args) ret = nil func = if args.empty? "" else args.first.to_s end log.info "starting remote_finish" log.debug "func=#{func}" case func when "Info" ret = { "steps" => 1, "title" => title, "when" => modes } when "Write" enable_remote else log.error "unknown function: #{func}" end log.debug "ret=#{ret}" log.info "remote_finish finished" ret end |
#title ⇒ Object
Text to display
64 65 66 |
# File 'src/lib/installation/remote_finish_client.rb', line 64 def title _("Enabling remote administration...") end |