File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ def kernel_arch
65
65
return ARCH_AARCH64 if arch == 'aarch64' || arch == 'arm64'
66
66
return ARCH_ARMLE if arch . start_with? 'arm'
67
67
return ARCH_X86 if arch . end_with? '86'
68
+ return ARCH_PPC if arch == 'ppc'
69
+ return ARCH_PPC64 if arch == 'ppc64'
70
+ return ARCH_PPC64LE if arch == 'ppc64le'
71
+ return ARCH_MIPS if arch == 'mips'
72
+ return ARCH_MIPS64 if arch == 'mips64'
73
+ return ARCH_SPARC if arch == 'sparc'
68
74
arch
69
75
end
70
76
@@ -74,8 +80,8 @@ def kernel_arch
74
80
# @return [Array]
75
81
#
76
82
def kernel_config
77
- return unless cmd_exec ( 'test -r /boot/config-`uname -r` && echo true' ) . include? 'true'
78
- output = cmd_exec ( "cat /boot/config-`uname -r` ") . to_s . strip
83
+ release = kernel_release
84
+ output = read_file ( " /boot/config-#{ release } ") . to_s . strip
79
85
return if output . empty?
80
86
config = output . split ( "\n " ) . map ( &:strip ) . reject ( &:empty? ) . reject { |i | i . start_with? '#' }
81
87
config
@@ -250,7 +256,7 @@ def lkrg_installed?
250
256
# Returns true if grsecurity is installed
251
257
#
252
258
def grsec_installed?
253
- cmd_exec ( 'test -c /dev/grsec && echo true' ) . to_s . strip . include? 'true'
259
+ File . exists? ( ' /dev/grsec' ) && File . chardev? ( '/dev/grsec' )
254
260
rescue
255
261
raise 'Could not determine grsecurity status'
256
262
end
You can’t perform that action at this time.
0 commit comments