Class: OsCtld::ContainerControl::Commands::WithRootfs::Frontend

Inherits:
Frontend
  • Object
show all
Defined in:
lib/osctld/container_control/commands/with_rootfs.rb

Instance Attribute Summary

Attributes inherited from Frontend

#command_class, #ct

Instance Method Summary collapse

Methods inherited from Frontend

#exec_runner, #fork_runner, #initialize

Constructor Details

This class inherits a constructor from OsCtld::ContainerControl::Frontend

Instance Method Details

#execute(opts) ⇒ Object

Parameters:

  • opts (Hash)

Options Hash (opts):



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/osctld/container_control/commands/with_rootfs.rb', line 15

def execute(opts)
  ct.mount

  ret = fork_runner(
    args: [{
      ctrc: opts.fetch(:ctrc, ct.get_run_conf),
      block: opts[:block]
    }],
    switch_to_system: false
  )
  ret.ok? ? ret.data : ret
end