[1907] 2008-11-10 Robert Millan <[email protected]>

Robert Millan <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 1907
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1907
Author:   robertmh
Date:     2008-11-10 08:49:26 +0000 (Mon, 10 Nov 2008)

Log Message:
-----------
2008-11-10  Robert Millan  <[email protected]>

        * util/grub.d/00_header.in: Add backward compatibility check for
        versions of terminal.mod that don't understand `terminal_input' or
        `terminal_output'.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/util/grub.d/00_header.in

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2008-11-09 20:32:57 UTC (rev 1906)
+++ trunk/grub2/ChangeLog	2008-11-10 08:49:26 UTC (rev 1907)
@@ -1,3 +1,9 @@
+2008-11-10  Robert Millan  <[email protected]>
+
+	* util/grub.d/00_header.in: Add backward compatibility check for
+	versions of terminal.mod that don't understand `terminal_input' or
+	`terminal_output'.
+
 2008-11-09  Robert Millan  <[email protected]>
 
 	* commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister

Modified: trunk/grub2/util/grub.d/00_header.in
===================================================================
--- trunk/grub2/util/grub.d/00_header.in	2008-11-09 20:32:57 UTC (rev 1906)
+++ trunk/grub2/util/grub.d/00_header.in	2008-11-10 08:49:26 UTC (rev 1907)
@@ -59,7 +59,13 @@
     # Just use the native terminal
   ;;
   x*)
-    echo "terminal_input ${GRUB_TERMINAL_INPUT}"
+    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
 
@@ -85,7 +91,11 @@
   set gfxmode=${GRUB_GFXMODE}
   insmod gfxterm
   insmod ${video_backend}
-  terminal_output gfxterm
+  if terminal_output gfxterm ; then true ; else
+    # For backward compatibility with versions of terminal.mod that don't
+    # understand terminal_output
+    terminal gfxterm
+  fi
 fi
 EOF
   ;;
@@ -93,6 +103,12 @@
     # Just use the native terminal
   ;;
   x*)
-    echo "terminal_output ${GRUB_TERMINAL_OUTPUT}"
+    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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.