From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OVp5J-0002KI-3m for mharc-grub-devel@gnu.org; Mon, 05 Jul 2010 13:03:57 -0400 Received: from [140.186.70.92] (port=39550 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVp5D-0002D7-Fh for grub-devel@gnu.org; Mon, 05 Jul 2010 13:03:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVp52-0008Vd-V8 for grub-devel@gnu.org; Mon, 05 Jul 2010 13:03:42 -0400 Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]:49356) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVp52-0008VV-Nn for grub-devel@gnu.org; Mon, 05 Jul 2010 13:03:40 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1OVp52-0007si-3H for grub-devel@gnu.org; Mon, 05 Jul 2010 17:03:40 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1OVp51-0000NB-00; Mon, 05 Jul 2010 18:03:39 +0100 Date: Mon, 5 Jul 2010 18:03:39 +0100 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20100705170338.GA1368@riva.ucam.org> References: <20100705152444.GE21862@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100705152444.GE21862@riva.ucam.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost02-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] Call background_image after terminal_output gfxterm X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2010 17:03:54 -0000 On Mon, Jul 05, 2010 at 04:24:44PM +0100, Colin Watson wrote: > 2010-07-05 Colin Watson > > * util/grub.d/00_header.in: Process GRUB_THEME and GRUB_BACKGROUND > after setting gfxterm as the active terminal. GRUB_BACKGROUND > doesn't work otherwise. Slight tweak to fix output indentation. === modified file 'util/grub.d/00_header.in' --- util/grub.d/00_header.in 2010-06-29 15:20:49 +0000 +++ util/grub.d/00_header.in 2010-07-05 16:57:28 +0000 @@ -127,40 +127,74 @@ if loadfont `make_system_path_relative_t set gfxmode=${GRUB_GFXMODE} load_video insmod gfxterm +fi EOF +fi + +case x${GRUB_TERMINAL_INPUT} in + x) + # Just use the native terminal + ;; + x*) + cat << EOF +if terminal_input ${GRUB_TERMINAL_INPUT} ; then true ; else + # For backward compatibility with versions of terminal.mod that don't + # understand terminal_input + terminal ${GRUB_TERMINAL_INPUT} +fi +EOF + ;; +esac + +case x${GRUB_TERMINAL_OUTPUT} in + x) + # Just use the native terminal + ;; + x*) + cat << EOF +if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else + # For backward compatibility with versions of terminal.mod that don't + # understand terminal_output + terminal ${GRUB_TERMINAL_OUTPUT} +fi +EOF + ;; +esac + +if [ "x$gfxterm" = x1 ]; then if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \ && is_path_readable_by_grub "$GRUB_THEME"; then echo "Found theme: $GRUB_THEME" >&2 - prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"` | sed -e "s/^/ /" + prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"` cat << EOF - insmod gfxmenu +insmod gfxmenu EOF themedir="`dirname "$GRUB_THEME"`" for x in "$themedir"/*.pf2 "$themedir"/f/*.pf2; do if [ -f "$x" ]; then cat << EOF - loadfont (\$root)`make_system_path_relative_to_its_root $x` +loadfont (\$root)`make_system_path_relative_to_its_root $x` EOF fi done if [ x"`echo "$themedir"/*.jpg`" != x"$themedir/*.jpg" ] || [ x"`echo "$themedir"/*.jpeg`" != x"$themedir/*.jpeg" ]; then cat << EOF - insmod jpeg +insmod jpeg EOF fi if [ x"`echo "$themedir"/*.png`" != x"$themedir/*.png" ]; then cat << EOF - insmod png +insmod png EOF fi if [ x"`echo "$themedir"/*.tga`" != x"$themedir/*.tga" ]; then cat << EOF - insmod tga +insmod tga EOF fi cat << EOF - set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME` +set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME` EOF elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \ && is_path_readable_by_grub "$GRUB_BACKGROUND"; then @@ -171,47 +205,14 @@ EOF *.jpg|*.jpeg) reader=jpeg ;; *) echo "Unsupported image format" >&2; exit 1 ;; esac - prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"` | sed -e "s/^/ /" + prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"` cat << EOF - insmod $reader - background_image -m stretch `make_system_path_relative_to_its_root "$GRUB_BACKGROUND"` +insmod $reader +background_image -m stretch `make_system_path_relative_to_its_root "$GRUB_BACKGROUND"` EOF fi - cat << EOF -fi -EOF fi -case x${GRUB_TERMINAL_INPUT} in - x) - # Just use the native terminal - ;; - x*) - cat << EOF -if terminal_input ${GRUB_TERMINAL_INPUT} ; then true ; else - # For backward compatibility with versions of terminal.mod that don't - # understand terminal_input - terminal ${GRUB_TERMINAL_INPUT} -fi -EOF - ;; -esac - -case x${GRUB_TERMINAL_OUTPUT} in - x) - # Just use the native terminal - ;; - x*) - cat << EOF -if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else - # For backward compatibility with versions of terminal.mod that don't - # understand terminal_output - terminal ${GRUB_TERMINAL_OUTPUT} -fi -EOF - ;; -esac - # Gettext variables and module if [ "x${LANG}" != "xC" ] && [ -d "${locale_dir}" ] ; then prepare_grub_to_access_device $(${grub_probe} --target=device ${locale_dir}) -- Colin Watson [cjwatson@ubuntu.com]