#!/bin/bash PLAT_FUNCS="/usr/local/sbin/nv_scripts/plat_funcs.bash" CONF_FILE="/etc/default/grub.d/nvidia-earlycon.cfg" GENERAL_FUNCS="/usr/local/sbin/nv_scripts/general_funcs.bash" . "${GENERAL_FUNCS}" . "${PLAT_FUNCS}" PLAT_NEEDS_EARLYCON=$(plat_needs_earlycon) if skip_platform_detection || [ ${PLAT_NEEDS_EARLYCON} != "1" ]; then if [ ${PLAT_NEEDS_EARLYCON} != "0" ]; then echo "GRUB_CMDLINE_LINUX=\"\$GRUB_CMDLINE_LINUX earlycon=${PLAT_NEEDS_EARLYCON}\"" > ${CONF_FILE} else echo 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX earlycon"' > ${CONF_FILE} fi /usr/sbin/update-grub ||: fi exit 0