Sha256: 1322d49a842b40746e9555a434cc1b84ac9adea202f5576024d8044b64899716

Contents?: true

Size: 242 Bytes

Versions: 6

Compression:

Stored size: 242 Bytes

Contents

Ohai.plugin(:InitSystem) do
  provides 'init_system'

  def from_cmd(cmd)
    so = shell_out(cmd)
    so.stdout.strip
  end

  collect_data(:linux) do
    init_system Mash.new
    init_system["init"] = from_cmd("cat /proc/1/comm")
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cupper-0.2.1 lib/cupper/plugins/ohai/init_system.rb
cupper-0.2.0 lib/cupper/plugins/ohai/init_system.rb
cupper-0.1.3 lib/cupper/plugins/ohai/init_system.rb
cupper-0.1.2 lib/cupper/plugins/ohai/init_system.rb
cupper-0.1.1 lib/cupper/plugins/ohai/init_system.rb
cupper-0.1.0 lib/cupper/plugins/ohai/init_system.rb