|
|
@ -22,12 +22,11 @@ import traceback
|
|
|
|
from os import path
|
|
|
|
from os import path
|
|
|
|
from cl_builder import DataVarsBuilder, printNoColor, __version__, __app__
|
|
|
|
from cl_builder import DataVarsBuilder, printNoColor, __version__, __app__
|
|
|
|
from cl_utils import process,listDirectory,cmpVersion,reVerSplitToPV, \
|
|
|
|
from cl_utils import process,listDirectory,cmpVersion,reVerSplitToPV, \
|
|
|
|
reVerSplit,getPkgInstalled
|
|
|
|
reVerSplit,getPkgInstalled,PIPE,STDOUT
|
|
|
|
from cl_vars_share import varsShare
|
|
|
|
from cl_vars_share import varsShare
|
|
|
|
from subprocess import STDOUT,PIPE
|
|
|
|
from subprocess import STDOUT,PIPE
|
|
|
|
from cl_print import color_print
|
|
|
|
from cl_print import color_print
|
|
|
|
from shutil import copy2 as copy_with_perm
|
|
|
|
from shutil import copy2 as copy_with_perm
|
|
|
|
from cl_apply_template import updateConfFiles
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from cl_kernel_utils import KernelConfig,InitRamFs
|
|
|
|
from cl_kernel_utils import KernelConfig,InitRamFs
|
|
|
|
|
|
|
|
|
|
|
@ -402,8 +401,9 @@ class cl_kernel(color_print):
|
|
|
|
# if has grub2
|
|
|
|
# if has grub2
|
|
|
|
if filter(lambda x:x.startswith("grub-1.99"),
|
|
|
|
if filter(lambda x:x.startswith("grub-1.99"),
|
|
|
|
listDirectory('/var/db/pkg/sys-boot')):
|
|
|
|
listDirectory('/var/db/pkg/sys-boot')):
|
|
|
|
clTemplate = updateConfFiles()
|
|
|
|
grubInstall = process('/usr/sbin/cl-core','--method','core_setup',
|
|
|
|
clTemplate.applyAllTemplates(package="grub")
|
|
|
|
'--pkg-name','grub',stderr=None)
|
|
|
|
|
|
|
|
grubInstall.success()
|
|
|
|
|
|
|
|
|
|
|
|
if not filter(lambda x:x.startswith("grub-0.9"),
|
|
|
|
if not filter(lambda x:x.startswith("grub-0.9"),
|
|
|
|
listDirectory('/var/db/pkg/sys-boot')) or not path.exists(grubconf):
|
|
|
|
listDirectory('/var/db/pkg/sys-boot')) or not path.exists(grubconf):
|
|
|
|