Class: Bixby::Provision::RunControl

Inherits:
Base
  • Object
show all
Defined in:
lib/bixby/provision/dsl/run_control.rb

Constant Summary collapse

EXPORTS =
[:first_boot]

Constants inherited from Base

Base::PATH

Instance Attribute Summary

Attributes inherited from Base

#manifest, #proxy

Instance Method Summary collapse

Methods inherited from Base

#get_gid, #get_group, #get_uid, #get_user, #initialize, #tap, #tempfile

Methods included from Util::File

#chmod, #chown, #sha256sum, #which

Constructor Details

This class inherits a constructor from Bixby::Provision::Base

Instance Method Details

#first_boot(&block) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/bixby/provision/dsl/run_control.rb', line 9

def first_boot(&block)
  if first_boot_has_run? then
    logger.info "first_boot already ran"
    return
  end

  logger.info "running first_boot block"
  begin
    block.call
  rescue Exception => ex
    # TODO fail!
    raise ex
    return
  end

  touch_first_boot_state
end