--- trunk/grubby/new-kernel-pkg 2016/06/30 10:22:14 2973 +++ trunk/grubby/new-kernel-pkg 2017/06/27 14:22:13 3004 @@ -155,7 +155,7 @@ mbargs="${HYPERVISOR_ARGS}" adddracutargs="" addplymouthinitrd="" -DEBUGARG="systemd.debug" +DEBUGARG="systemd.log_level=debug systemd.log_target=kmsg" usage() { @@ -177,7 +177,12 @@ then [[ ${MAKEDEBUG} != yes ]] && return 0 [[ -n ${verbose} ]] && echo "- First, making a debug entry." - declare -x debugtitle=" with debugging" + if [[ ${ARCH} = s390 ]] || [[ ${ARCH} = s390x ]] + then + declare -x debugtitle="_with_debugging" + else + declare -x debugtitle=" with debugging" + fi declare -x debugargs="${DEBUGARG}" shift else @@ -919,49 +924,22 @@ fi [[ -n ${verbose} ]] && echo "devtreedir is ${devtreedir}" -# add dracut i18n, keyboard and plymouth kernel args if requested -if [[ -n ${dracut} ]] || [[ -n ${adddracutargs} ]] -then - if [ -r /etc/vconsole.conf ] - then - . /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 - - if [[ -n ${CONSOLEFONT} ]] - then - kernargs="${kernargs} SYSFONT=${CONSOLEFONT}" - fi - fi - - if [ -r /etc/conf.d/keymap ] - then - . /etc/conf.d/keymap - - if [[ -n ${KEYMAP} ]] - 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 +# add dracut kernel args if requested +if [[ -n ${dracut} ]] && [[ -n ${adddracutargs} ]] + [ -r /etc/vconsole.conf ] && . /etc/vconsole.conf + [ -r /etc/locale.conf ] && . /etc/locale.conf + + while read opt rd_opt + do + [ -n "${!opt}" ] && kernargs="$kernargs $rd_opt=\"${!opt}\"" + done <<< 'KEYMAP rd.vconsole.keymap + FONT rd.vconsole.font + FONT_MAP rd.vconsole.font.map + FONT_UNIMAP rd.vconsole.font.unimap + UNICODE rd.vconsole.font.unicode + EXT_KEYMAP rd.vconsole.keymap.ext + LANG rd.locale.LANG + LC_ALL rd.locale.LC_ALL' fi # set this as the default if we have the package and it matches @@ -1056,4 +1034,13 @@ # if we mounted the U-Boot directory, unmount it. [[ -n ${mounted} ]] && umount ${ubootDir} +# make sure changes make it to the disk. +# if /boot is a mountpoint, force the meta data on disk +# to by-pass writeback delay. +# PPC64LE-only to deal with Petitboot issues +if [[ ${ARCH} = ppc64le ]] +then + sync && mountpoint -q /boot && fsfreeze -f /boot && fsfreeze -u /boot +fi + exit 0