Class: CmdLine::Kernel

Inherits:
Object
  • Object
show all
Includes:
CmdLine
Defined in:
lib/cmdline.rb

Instance Method Summary collapse

Methods included from CmdLine

#echo

Constructor Details

#initialize(arg) ⇒ Kernel

man kernel-install use /etc/kernel/cmdline by default



14
15
16
17
18
# File 'lib/cmdline.rb', line 14

def initialize(arg)
  @dir = arg[:workdir]
  @file = "#{@dir}/cmdline"
  @line = ''
end

Instance Method Details

#mainObject



20
21
22
23
24
25
26
27
28
29
# File 'lib/cmdline.rb', line 20

def main
  puts ' > Generate cmdline for Kernel...'
  cpu_mitigations
  distrust_cpu
  kernel_hardening
  quiet

  puts " >> Writing cmdline to #{@file}..."
  echo @file, "#{@line}\n", 0644
end