grub2 changes: use ascii.pf2 as grub2 font; support terminal_output command
authorMichael Prokop <mika@grml.org>
Tue, 28 Jul 2009 17:02:15 +0000 (19:02 +0200)
committerMichael Prokop <mika@grml.org>
Tue, 28 Jul 2009 17:02:15 +0000 (19:02 +0200)
debian/changelog
grml2usb

index 3332c6e..0cbc31f 100644 (file)
@@ -1,3 +1,12 @@
+grml2usb (0.9.9) UNRELEASED; urgency=low
+
+  * Use ascii.pf2 as grub2 font, since grub2 (1.96+20090307-1)
+    the old ascii.pff isn't available anymore.
+  * Use terminal_output if available, otherwise fallback to old
+    older 'terminal'-command (thanks to Felix Zielcke for helping).
+
+ -- Michael Prokop <mika@grml.org>  Tue, 28 Jul 2009 18:52:04 +0200
+
 grml2usb (0.9.8) unstable; urgency=low
 
   * Support installation on /dev/loop*-devices.
index fd6dc17..3009327 100755 (executable)
--- a/grml2usb
+++ b/grml2usb
@@ -18,7 +18,7 @@ from inspect import isroutine, isclass
 import datetime, logging, os, re, subprocess, sys, tempfile, time
 
 # global variables
-PROG_VERSION = "0.9.8"
+PROG_VERSION = "0.9.9"
 MOUNTED = set()  # register mountpoints
 TMPFILES = set() # register tmpfiles
 DATESTAMP = time.mktime(datetime.datetime.now().timetuple()) # unique identifier for syslinux.cfg
@@ -249,12 +249,16 @@ set timeout=5
 
 insmod fat
 
-if font /boot/grub/ascii.pff ; then
+if loadfont /boot/grub/ascii.pf2 ; then
    insmod png
    set gfxmode=640x480
    insmod gfxterm
    insmod vbe
-   terminal 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
 
 if background_image /boot/grub/grml.png ; then
@@ -1167,10 +1171,10 @@ def copy_bootloader_files(iso_mount, target):
         proc.wait()
 
     # font file for graphical bootsplash in grub
-    if os.path.isfile("/usr/share/grub/ascii.pff"):
-        logging.debug("rsync -rlptDH --inplace /usr/share/grub/ascii.pff to %s" % grub_target + 'ascii.pff')
-        proc = subprocess.Popen(["rsync", "-rlptDH", "--inplace", '/usr/share/grub/ascii.pff',
-                                grub_target + 'ascii.pff'])
+    if os.path.isfile("/usr/share/grub/ascii.pf2"):
+        logging.debug("rsync -rlptDH --inplace /usr/share/grub/ascii.pf2 to %s" % grub_target + 'ascii.pf2')
+        proc = subprocess.Popen(["rsync", "-rlptDH", "--inplace", '/usr/share/grub/ascii.pf2',
+                                grub_target + 'ascii.pf2'])
         proc.wait()