186 |
declare -x debugargs="${DEBUGARG}" |
declare -x debugargs="${DEBUGARG}" |
187 |
shift |
shift |
188 |
else |
else |
189 |
[[ -n ${verbose} ] && echo "- Making a normal entry." |
[[ -n ${verbose} ]] && echo "- Making a normal entry." |
190 |
fi |
fi |
191 |
$(eval $grubby $@) |
$(eval $grubby $@) |
192 |
export -n debugargs |
export -n debugargs |
295 |
--title=\"${title}\${debugtitle}\" --copy-default \ |
--title=\"${title}\${debugtitle}\" --copy-default \ |
296 |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
297 |
--remove-kernel=\"TITLE=${title}\${debugtitle}\"" |
--remove-kernel=\"TITLE=${title}\${debugtitle}\"" |
|
rungrubby --debug ${ARGS} |
|
298 |
rungrubby ${ARGS} ${makedefault} |
rungrubby ${ARGS} ${makedefault} |
299 |
|
rungrubby --debug ${ARGS} --set-index=1 |
300 |
else |
else |
301 |
[[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby for grub 0.97" |
[[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby for grub 0.97" |
302 |
fi |
fi |
310 |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
311 |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
312 |
--remove-kernel=\"TITLE=${title}\${debugtitle}\"" |
--remove-kernel=\"TITLE=${title}\${debugtitle}\"" |
|
rungrubby --debug ${ARGS} |
|
313 |
rungrubby ${ARGS} ${makedefault} |
rungrubby ${ARGS} ${makedefault} |
314 |
|
rungrubby --debug ${ARGS} --set-index=1 |
315 |
else |
else |
316 |
[[ -n ${verbose} ]] && echo "${grub2Config} does not exist, not running grubby for grub 2" |
[[ -n ${verbose} ]] && echo "${grub2Config} does not exist, not running grubby for grub 2" |
317 |
fi |
fi |
326 |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
327 |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
328 |
--remove-kernel=\"TITLE=${title}\${debugtitle}\"" |
--remove-kernel=\"TITLE=${title}\${debugtitle}\"" |
|
rungrubby --debug ${ARGS} |
|
329 |
rungrubby ${ARGS} ${makedefault} |
rungrubby ${ARGS} ${makedefault} |
330 |
|
rungrubby --debug ${ARGS} --set-index=1 |
331 |
else |
else |
332 |
[[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby for grub 2 with UEFI" |
[[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby for grub 2 with UEFI" |
333 |
fi |
fi |
342 |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
343 |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
344 |
--remove-kernel=\"TITLE=${version}\"" |
--remove-kernel=\"TITLE=${version}\"" |
|
rungrubby --debug ${ARGS} |
|
345 |
rungrubby ${ARGS} ${makedefault} |
rungrubby ${ARGS} ${makedefault} |
346 |
|
rungrubby --debug ${ARGS} --set-index=1 |
347 |
|
|
348 |
if [[ -n ${runLilo} ]] |
if [[ -n ${runLilo} ]] |
349 |
then |
then |
370 |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
371 |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
372 |
--remove-kernel=\"TITLE=${title}\${debugtitle}\"" |
--remove-kernel=\"TITLE=${title}\${debugtitle}\"" |
|
rungrubby --debug ${ARGS} |
|
373 |
rungrubby ${ARGS} ${makedefault} |
rungrubby ${ARGS} ${makedefault} |
374 |
|
rungrubby --debug ${ARGS} --set-index=1 |
375 |
else |
else |
376 |
[[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby for extlinux" |
[[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby for extlinux" |
377 |
fi |
fi |
540 |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
541 |
${mbkernel:+--add-multiboot=\"${mbkernel}\"} \ |
${mbkernel:+--add-multiboot=\"${mbkernel}\"} \ |
542 |
--title=\"${title}\${debugtitle}\"" |
--title=\"${title}\${debugtitle}\"" |
|
rungrubby --debug ${ARGS} |
|
543 |
rungrubby ${ARGS} |
rungrubby ${ARGS} |
544 |
|
rungrubby --debug ${ARGS} |
545 |
else |
else |
546 |
[[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby" |
[[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby" |
547 |
fi |
fi |
553 |
${kernargs:+--args=\"${kernargs}\"} \ |
${kernargs:+--args=\"${kernargs}\"} \ |
554 |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
555 |
--title=\"${title}\${debugtitle}\"" |
--title=\"${title}\${debugtitle}\"" |
|
rungrubby --debug ${ARGS} |
|
556 |
rungrubby ${ARGS} |
rungrubby ${ARGS} |
557 |
|
rungrubby --debug ${ARGS} |
558 |
else |
else |
559 |
[[ -n ${verbose} ]] && echo "${grub2Config} does not exist, not running grubby" |
[[ -n ${verbose} ]] && echo "${grub2Config} does not exist, not running grubby" |
560 |
fi |
fi |
566 |
${INITRD} ${kernargs:+--args=\"${kernargs}\"} \ |
${INITRD} ${kernargs:+--args=\"${kernargs}\"} \ |
567 |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
568 |
--title=\"${title}\${debugtitle}\"" |
--title=\"${title}\${debugtitle}\"" |
|
rungrubby --debug ${ARGS} |
|
569 |
rungrubby ${ARGS} |
rungrubby ${ARGS} |
570 |
|
rungrubby --debug ${ARGS} |
571 |
else |
else |
572 |
[[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby" |
[[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby" |
573 |
fi |
fi |
579 |
${kernargs:+--args=\"${kernargs}\"} \ |
${kernargs:+--args=\"${kernargs}\"} \ |
580 |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
581 |
--title=\"${title}\${debugtitle}\"" |
--title=\"${title}\${debugtitle}\"" |
|
rungrubby --debug ${ARGS} |
|
582 |
rungrubby ${ARGS} |
rungrubby ${ARGS} |
583 |
|
rungrubby --debug ${ARGS} |
584 |
|
|
585 |
if [[ -n ${runLilo} ]] |
if [[ -n ${runLilo} ]] |
586 |
then |
then |
637 |
${DEVTREE} ${DEVTREEDIR} ${INITRD} ${kernargs:+--args=\"${kernargs}\"} \ |
${DEVTREE} ${DEVTREEDIR} ${INITRD} ${kernargs:+--args=\"${kernargs}\"} \ |
638 |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
639 |
--title=\"${title}\${debugtitle}\"" |
--title=\"${title}\${debugtitle}\"" |
|
rungrubby --debug ${ARGS} |
|
640 |
rungrubby ${ARGS} |
rungrubby ${ARGS} |
641 |
|
rungrubby --debug ${ARGS} |
642 |
else |
else |
643 |
[[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby" |
[[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby" |
644 |
fi |
fi |
924 |
fi |
fi |
925 |
[[ -n ${verbose} ]] && echo "devtreedir is ${devtreedir}" |
[[ -n ${verbose} ]] && echo "devtreedir is ${devtreedir}" |
926 |
|
|
927 |
# add dracut i18n, keyboard and plymouth kernel args if requested |
# add dracut kernel args if requested |
928 |
if [[ -n ${dracut} ]] || [[ -n ${adddracutargs} ]] |
if [[ -n ${dracut} ]] && [[ -n ${adddracutargs} ]] |
929 |
then |
then |
930 |
if [ -r /etc/vconsole.conf ] |
[ -r /etc/vconsole.conf ] && . /etc/vconsole.conf |
931 |
then |
[ -r /etc/locale.conf ] && . /etc/locale.conf |
|
. /etc/vconsole.conf |
|
|
|
|
|
for i in SYSFONT SYSFONTACM UNIMAP KEYTABLE |
|
|
do |
|
|
val=$(eval echo \$$i) |
|
|
[[ -n ${val} ]] && kernargs="${kernargs} ${i}=${val}" |
|
|
done |
|
|
else |
|
|
if [ -r /etc/conf.d/consolefont ] |
|
|
then |
|
|
. /etc/conf.d/consolefont |
|
932 |
|
|
933 |
if [[ -n ${CONSOLEFONT} ]] |
while read opt rd_opt |
934 |
then |
do |
935 |
kernargs="${kernargs} SYSFONT=${CONSOLEFONT}" |
[ -n "${!opt}" ] && kernargs="$kernargs $rd_opt=\"${!opt}\"" |
936 |
fi |
done <<< 'KEYMAP rd.vconsole.keymap |
937 |
fi |
FONT rd.vconsole.font |
938 |
|
FONT_MAP rd.vconsole.font.map |
939 |
if [ -r /etc/conf.d/keymap ] |
FONT_UNIMAP rd.vconsole.font.unimap |
940 |
then |
UNICODE rd.vconsole.font.unicode |
941 |
. /etc/conf.d/keymap |
EXT_KEYMAP rd.vconsole.keymap.ext |
942 |
|
LANG rd.locale.LANG |
943 |
if [[ -n ${KEYMAP} ]] |
LC_ALL rd.locale.LC_ALL' |
|
then |
|
|
kernargs="${kernargs} KEYTABLE=${KEYMAP}" |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
if [ -r /etc/locale.conf ] |
|
|
then |
|
|
. /etc/locale.conf |
|
|
|
|
|
if [[ -n ${LANG} ]] |
|
|
then |
|
|
kernargs="${kernargs} LANG=${LANG}" |
|
|
fi |
|
|
fi |
|
944 |
fi |
fi |
945 |
|
|
946 |
# set this as the default if we have the package and it matches |
# set this as the default if we have the package and it matches |
1035 |
# if we mounted the U-Boot directory, unmount it. |
# if we mounted the U-Boot directory, unmount it. |
1036 |
[[ -n ${mounted} ]] && umount ${ubootDir} |
[[ -n ${mounted} ]] && umount ${ubootDir} |
1037 |
|
|
1038 |
|
# make sure changes make it to the disk. |
1039 |
|
# if /boot is a mountpoint, force the meta data on disk |
1040 |
|
# to by-pass writeback delay. |
1041 |
|
# PPC64LE-only to deal with Petitboot issues |
1042 |
|
if [[ ${ARCH} = ppc64le ]] |
1043 |
|
then |
1044 |
|
sync && mountpoint -q /boot && fsfreeze -f /boot && fsfreeze -u /boot |
1045 |
|
fi |
1046 |
|
|
1047 |
exit 0 |
exit 0 |