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():
|
def install_kernel():
|
||||||
makeopts = os.environ.get("MAKEOPTS", "")
|
makeopts = os.environ.get("MAKEOPTS", "")
|
||||||
|
modules_install = False
|
||||||
|
|
||||||
subprocess.check_call(
|
for line in open("/usr/src/linux/.config"):
|
||||||
[
|
if "CONFIG_MODULES=y" in line:
|
||||||
"make",
|
modules_install = True
|
||||||
"-C",
|
break
|
||||||
"/usr/src/linux",
|
|
||||||
"MAKEOPTS=" + makeopts,
|
if modules_install:
|
||||||
"install",
|
subprocess.check_call([
|
||||||
"modules_install",
|
'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
|
# create the symlink. /sbin/installkernel claims this is not used on
|
||||||
# "modern" distributions and doesn't create it (unless it already
|
# "modern" distributions and doesn't create it (unless it already
|
||||||
|
|
Loading…
Reference in New Issue