Class: OsCtld::ContainerControl::Commands::WithMountns::Frontend
- Inherits:
-
Frontend
- Object
- Frontend
- OsCtld::ContainerControl::Commands::WithMountns::Frontend
- Defined in:
- lib/osctld/container_control/commands/with_mountns.rb
Instance Attribute Summary
Attributes inherited from Frontend
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
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/osctld/container_control/commands/with_mountns.rb', line 19 def execute(opts) ct.mount ret = fork_runner({ args: [{ ctrc: opts.fetch(:ctrc, ct.get_run_conf), ns_pid: opts[:ns_pid], chroot: opts[:chroot], switch_to_system: opts.fetch(:switch_to_system, true), block: opts[:block] }], switch_to_system: false, stdout: opts[:stdout] }.compact) ret.ok? ? ret.data : ret end |