On Sun, Feb 03, 2008 at 02:29:55PM +0100, Robert Millan wrote: > On Sun, Feb 03, 2008 at 09:05:38PM +0800, Bean wrote: > > > > if font (xxx)/some-file.pff ; then > > # graphic mode setting > > else > > # text mode setting > > fi > > > > i think this behavior is consistent with sh, an error code returned > > from command should not cause the script to abort. > > Urg, part of update-grub was written with the idea that this ought to be > handled in "build" time. I guess I'll have to overhaul some of it...
Well, it wasn't such a big change after all. The sanity checks done at grub.cfg generation time are worth keeping, IMHO, since they off-load GRUB from performing them (and it is more practical to add logic in bash when possible). This should address the problem. -- Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.)
* util/grub.d/00_header.in: Issue scripting commands for GRUB to only setup gfxterm when `font' command has succeeded. diff -x CVS -x '*~' -x '*.mk' -urp ../grub2/util/grub.d/00_header.in ./util/grub.d/00_header.in --- ../grub2/util/grub.d/00_header.in 2008-01-12 16:11:56.000000000 +0100 +++ ./util/grub.d/00_header.in 2008-02-03 15:50:58.000000000 +0100 @@ -42,15 +42,14 @@ if [ "x${GRUB_DRIVE}" = "x" ] ; then : ; echo "set root=${GRUB_DRIVE}" fi -if [ "x${GRUB_FONT_PATH}" = "x" ] ; then : ; else - echo "font ${GRUB_FONT_PATH}" -fi - case ${platform}:${GRUB_TERMINAL} in pc:gfxterm) cat << EOF -set gfxmode=640x480 -insmod gfxterm -insmod vbe +if font ${GRUB_FONT_PATH} ; then + set gfxmode=640x480 + insmod gfxterm + insmod vbe + terminal gfxterm +fi EOF ;; *:serial) @@ -59,7 +58,9 @@ EOF GRUB_SERIAL_COMMAND=serial fi echo "${GRUB_SERIAL_COMMAND}" + echo "terminal serial" + ;; + *:*) + echo "terminal ${GRUB_TERMINAL}" ;; esac - -echo "terminal ${GRUB_TERMINAL}"
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel