Add support for memtest image
authorMichael Prokop <mika@grml.org>
Tue, 17 Feb 2009 23:53:58 +0000 (00:53 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 17 Feb 2009 23:53:58 +0000 (00:53 +0100)
grml2usb

index b669ad2..b57d6cc 100755 (executable)
--- a/grml2usb
+++ b/grml2usb
@@ -292,7 +292,6 @@ APPEND initrd=/boot/release/%(grml_flavour)s/initrd.gz apm=power-off boot=live n
 # memtest
 LABEL  memtest
 KERNEL /boot/addons/memtest
-#APPEND BOOT_IMAGE=memtest
 
 # grub
 LABEL grub
@@ -694,7 +693,7 @@ def copy_addons(iso_mount, target):
         proc = subprocess.Popen(["install", "--mode=664", balderimg, addons + 'balder10.imz'])
         proc.wait()
 
-    # memtest86+ image
+    # memdisk image
     memdiskimg = search_file('memdisk', iso_mount)
     if memdiskimg is None:
         logging.warn("Warning: memdisk not found - can not install it")
@@ -703,6 +702,15 @@ def copy_addons(iso_mount, target):
         proc = subprocess.Popen(["install", "--mode=664", memdiskimg, addons + 'memdisk'])
         proc.wait()
 
+    # memtest86+ image
+    memtestimg = search_file('memtest', iso_mount)
+    if memtestimg is None:
+        logging.warn("Warning: memtest not found - can not install it")
+    else:
+        logging.debug("cp %s %s" % (memtestimg, addons + '/memtest'))
+        proc = subprocess.Popen(["install", "--mode=664", memtestimg, addons + 'memtest'])
+        proc.wait()
+
 
 def copy_bootloader_files(iso_mount, target):
     """"TODO"""