class Chef::Resource::KernelModule

Public Instance Methods

initramfs_command() click to toggle source

determine the correct command to regen the initramfs based on platform @return [String]

# File lib/chef/resource/kernel_module.rb, line 225
def initramfs_command
  if platform_family?("debian")
    "update-initramfs -u"
  else
    "dracut -f"
  end
end
module_loaded?() click to toggle source

see if the module is listed in /proc/modules or not @return [Boolean]

# File lib/chef/resource/kernel_module.rb, line 235
def module_loaded?
  /^#{new_resource.modname}/.match?(::File.read("/proc/modules"))
end