Class: Serverspec::Type::LinuxKernelParameter

Inherits:
Base
  • Object
show all
Defined in:
lib/serverspec/type/linux_kernel_parameter.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_ary, #to_s

Constructor Details

This class inherits a constructor from Serverspec::Type::Base

Instance Method Details

#valueObject


4
5
6
7
8
9
# File 'lib/serverspec/type/linux_kernel_parameter.rb', line 4

def value
  ret = backend.run_command("/sbin/sysctl -q -n #{@name}")
  val = ret[:stdout].strip
  val = val.to_i if val.match(/^\d+$/)
  val
end