support for kernel configs without modules support
This commit is contained in:
parent
8bacd765d0
commit
5cc933830b
|
@ -76,17 +76,22 @@ def remove_old_kernels():
|
|||
|
||||
def install_kernel():
|
||||
makeopts = os.environ.get("MAKEOPTS", "")
|
||||
modules_install = False
|
||||
|
||||
subprocess.check_call(
|
||||
[
|
||||
"make",
|
||||
"-C",
|
||||
"/usr/src/linux",
|
||||
"MAKEOPTS=" + makeopts,
|
||||
"install",
|
||||
"modules_install",
|
||||
]
|
||||
)
|
||||
for line in open("/usr/src/linux/.config"):
|
||||
if "CONFIG_MODULES=y" in line:
|
||||
modules_install = True
|
||||
break
|
||||
|
||||
if modules_install:
|
||||
subprocess.check_call([
|
||||
'make', '-C', '/usr/src/linux', 'MAKEOPTS=' + makeopts, 'install',
|
||||
'modules_install'
|
||||
])
|
||||
else:
|
||||
subprocess.check_call([
|
||||
'make', '-C', '/usr/src/linux', 'MAKEOPTS=' + makeopts, 'install'
|
||||
])
|
||||
|
||||
# create the symlink. /sbin/installkernel claims this is not used on
|
||||
# "modern" distributions and doesn't create it (unless it already
|
||||
|
|
Loading…
Reference in New Issue