Class: OsCtld::Container::Hooks::PostMount

Inherits:
Base show all
Defined in:
lib/osctld/container/hooks.rb

Instance Attribute Summary

Attributes inherited from Base

#ct

Attributes inherited from Hook::Base

#event_instance, #opts

Instance Method Summary collapse

Methods inherited from Base

ct_hook, #setup

Methods inherited from Hook::Base

blocking, blocking?, #blocking?, #exec, hook, #initialize, #setup

Constructor Details

This class inherits a constructor from OsCtld::Hook::Base

Instance Method Details

#environmentObject (protected)



78
79
80
81
82
# File 'lib/osctld/container/hooks.rb', line 78

def environment
  super.merge({
    'OSCTL_CT_ROOTFS_MOUNT' => opts[:rootfs_mount],
  })
end

#executable(hook_path) ⇒ Object (protected)



84
85
86
# File 'lib/osctld/container/hooks.rb', line 84

def executable(hook_path)
  ['nsenter', '--target', opts[:ns_pid].to_s, '--mount', hook_path]
end