Refactored addon handlng for grml-live.
authorUlrich Dangel <uli@spamt.net>
Sun, 25 Oct 2009 11:54:17 +0000 (12:54 +0100)
committerUlrich Dangel <uli@spamt.net>
Mon, 26 Oct 2009 11:38:18 +0000 (12:38 +0100)
Each entry resists now in an own file for simplified handling of addons.

12 files changed:
grml-live
templates/boot/isolinux/addon_10_grub2.cfg [new file with mode: 0644]
templates/boot/isolinux/addon_15_grub1.cfg [new file with mode: 0644]
templates/boot/isolinux/addon_20_allinone.cfg [new file with mode: 0644]
templates/boot/isolinux/addon_25_gxpe.cfg [new file with mode: 0644]
templates/boot/isolinux/addon_30_dos.cfg [new file with mode: 0644]
templates/boot/isolinux/addon_35_bsd.cfg [new file with mode: 0644]
templates/boot/isolinux/addon_40_memtest.cfg [new file with mode: 0644]
templates/boot/isolinux/addon_45_hdt.cfg [new file with mode: 0644]
templates/boot/isolinux/addons.cfg
templates/boot/isolinux/addons_list.cfg [new file with mode: 0644]
templates/boot/isolinux/isolinux.cfg

index 5f04f87..a718a41 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -28,6 +28,7 @@ PN="$(basename $0)"
 CMDLINE="$0 $@"
 ISO_DATE="$(date +%Y-%m-%d)"
 SOURCES_LIST_FILE='/etc/grml/fai/apt/sources.list'
 CMDLINE="$0 $@"
 ISO_DATE="$(date +%Y-%m-%d)"
 SOURCES_LIST_FILE='/etc/grml/fai/apt/sources.list'
+ADDONS_LIST_FILE='/boot/isolinux/addons_list.cfg'
 # }}}
 
 # usage information {{{
 # }}}
 
 # usage information {{{
@@ -696,6 +697,13 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then
       sed -i "s/%SQUASHFS_NAME%/$SQUASHFS_NAME/" "$BUILD_OUTPUT"/boot/isolinux/f4
       sed -i "s/%SQUASHFS_NAME%/$SQUASHFS_NAME/" "$BUILD_OUTPUT"/boot/isolinux/f5
 
       sed -i "s/%SQUASHFS_NAME%/$SQUASHFS_NAME/" "$BUILD_OUTPUT"/boot/isolinux/f4
       sed -i "s/%SQUASHFS_NAME%/$SQUASHFS_NAME/" "$BUILD_OUTPUT"/boot/isolinux/f5
 
+      # generate addon list
+      rm "${BUILD_OUTPUT}/${ADDONS_LIST_FILE}"
+      for name in $(ls "${BUILD_OUTPUT}"/boot/isolinux/addon_*.cfg) ; do
+        include_name=$(basename "$name")
+        echo "include $include_name"  >> "${BUILD_OUTPUT}/${ADDONS_LIST_FILE}"
+      done
+
       if ! [ -r "${BUILD_OUTPUT}/boot/isolinux/${DISTRI_NAME}.cfg" ] || [ "$DISTRI_NAME" = "grml" ] ; then
          log "including grmlmain.cfg in ${BUILD_OUTPUT}/boot/isolinux/distri.cfg"
          echo "include grmlmain.cfg"    >  "${BUILD_OUTPUT}/boot/isolinux/distri.cfg"
       if ! [ -r "${BUILD_OUTPUT}/boot/isolinux/${DISTRI_NAME}.cfg" ] || [ "$DISTRI_NAME" = "grml" ] ; then
          log "including grmlmain.cfg in ${BUILD_OUTPUT}/boot/isolinux/distri.cfg"
          echo "include grmlmain.cfg"    >  "${BUILD_OUTPUT}/boot/isolinux/distri.cfg"
diff --git a/templates/boot/isolinux/addon_10_grub2.cfg b/templates/boot/isolinux/addon_10_grub2.cfg
new file mode 100644 (file)
index 0000000..ad0c1b1
--- /dev/null
@@ -0,0 +1,9 @@
+label grub2
+  menu label Run Bootloader Grub^2
+  kernel /boot/addons/bsd4grml/ldbsd.com
+  append echo Loading GRUB...`machine exec grub /boot/grub/core.img
+
+  text help
+                                        Start Bootloader Grub (version 2).
+  endtext
+
diff --git a/templates/boot/isolinux/addon_15_grub1.cfg b/templates/boot/isolinux/addon_15_grub1.cfg
new file mode 100644 (file)
index 0000000..0d264f1
--- /dev/null
@@ -0,0 +1,9 @@
+label grub1
+  menu label Run Bootloader Grub-Legacy (version ^1)
+  kernel /boot/addons/bsd4grml/ldbsd.com
+  append echo Loading GRUB...`machine exec grub /boot/grub/%GRUB_LEGACY%
+
+  text help
+                                        Start Bootloader Grub (version 1).
+  endtext
+
diff --git a/templates/boot/isolinux/addon_20_allinone.cfg b/templates/boot/isolinux/addon_20_allinone.cfg
new file mode 100644 (file)
index 0000000..842fa5d
--- /dev/null
@@ -0,0 +1,12 @@
+label allinone
+  menu label Run ^All-in-One-Image
+  kernel /boot/addons/memdisk
+  append initrd=/boot/addons/allinone.img
+
+  text help
+                                        Start All-in-One-Image, being a special
+                                        version of Grub with an easy to use
+                                        interface for booting from local disks,
+                                        booting via PXE (with gPXE support),...
+  endtext
+
diff --git a/templates/boot/isolinux/addon_25_gxpe.cfg b/templates/boot/isolinux/addon_25_gxpe.cfg
new file mode 100644 (file)
index 0000000..80b8250
--- /dev/null
@@ -0,0 +1,9 @@
+label gpxe
+  menu label Run GP^XE
+  kernel /boot/addons/gpxe.lkrn
+
+  text help
+                                        Start Etherboot/gPXE for booting via
+                                        network (PXE).
+  endtext
+
diff --git a/templates/boot/isolinux/addon_30_dos.cfg b/templates/boot/isolinux/addon_30_dos.cfg
new file mode 100644 (file)
index 0000000..290caf5
--- /dev/null
@@ -0,0 +1,9 @@
+label dos
+  menu label Run ^FreeDOS
+  kernel /boot/addons/memdisk
+  append initrd=/boot/addons/balder10.imz
+
+  text help
+                                        Boot FreeDOS.
+  endtext
+
diff --git a/templates/boot/isolinux/addon_35_bsd.cfg b/templates/boot/isolinux/addon_35_bsd.cfg
new file mode 100644 (file)
index 0000000..529dafa
--- /dev/null
@@ -0,0 +1,9 @@
+label bsd
+  menu label Run MirOS bsd^4grml
+  kernel /boot/addons/bsd4grml/ldbsd.com
+
+  text help
+                                        Boot a minimalistic BSD operating
+                                        system, known as MirOS bsd4grml.
+  endtext
+
diff --git a/templates/boot/isolinux/addon_40_memtest.cfg b/templates/boot/isolinux/addon_40_memtest.cfg
new file mode 100644 (file)
index 0000000..bd2d51f
--- /dev/null
@@ -0,0 +1,9 @@
+label memtest
+  menu label Run ^Memtest86+
+  kernel /boot/addons/memtest
+  append BOOT_IMAGE=memtest
+
+  text help
+                                        Start memory test using memtest86+.
+  endtext
+
diff --git a/templates/boot/isolinux/addon_45_hdt.cfg b/templates/boot/isolinux/addon_45_hdt.cfg
new file mode 100644 (file)
index 0000000..58fde89
--- /dev/null
@@ -0,0 +1,9 @@
+label hdt
+  menu label Run Hardware Detection ^Tool
+  kernel /boot/addons/hdt.c32
+  append pciids=/boot/addons/pci.ids
+
+  text help
+                                        Start a simple Hardware Detection
+                                        Tool.
+  endtext
index e5bfe45..869a4e9 100644 (file)
@@ -6,81 +6,14 @@ menu label ^Back to main menu...
 menu exit
 menu separator
 
 menu exit
 menu separator
 
-label grub2
-  menu label Run Bootloader Grub^2
-  kernel /boot/addons/bsd4grml/ldbsd.com
-  append echo Loading GRUB...`machine exec grub /boot/grub/core.img
+include addons_list.cfg
 
 
-  text help
-                                        Start Bootloader Grub (version 2).
-  endtext
 
 
-label grub1
-  menu label Run Bootloader Grub-Legacy (version ^1)
-  kernel /boot/addons/bsd4grml/ldbsd.com
-  append echo Loading GRUB...`machine exec grub /boot/grub/%GRUB_LEGACY%
 
 
-  text help
-                                        Start Bootloader Grub (version 1).
-  endtext
 
 
-label allinone
-  menu label Run ^All-in-One-Image
-  kernel /boot/addons/memdisk
-  append initrd=/boot/addons/allinone.img
 
 
-  text help
-                                        Start All-in-One-Image, being a special
-                                        version of Grub with an easy to use
-                                        interface for booting from local disks,
-                                        booting via PXE (with gPXE support),...
-  endtext
 
 
-label gpxe
-  menu label Run GP^XE
-  kernel /boot/addons/gpxe.lkrn
 
 
-  text help
-                                        Start Etherboot/gPXE for booting via
-                                        network (PXE).
-  endtext
-
-label dos
-  menu label Run ^FreeDOS
-  kernel /boot/addons/memdisk
-  append initrd=/boot/addons/balder10.imz
-
-  text help
-                                        Boot FreeDOS.
-  endtext
-
-label bsd
-  menu label Run MirOS bsd^4grml
-  kernel /boot/addons/bsd4grml/ldbsd.com
-
-  text help
-                                        Boot a minimalistic BSD operating
-                                        system, known as MirOS bsd4grml.
-  endtext
-
-label memtest
-  menu label Run ^Memtest86+
-  kernel /boot/addons/memtest
-  append BOOT_IMAGE=memtest
-
-  text help
-                                        Start memory test using memtest86+.
-  endtext
-
-label hdt
-  menu label Run Hardware Detection ^Tool
-  kernel /boot/addons/hdt.c32
-  append pciids=/boot/addons/pci.ids
-
-  text help
-                                        Start a simple Hardware Detection
-                                        Tool.
-  endtext
 
 label exit
 menu hide
 
 label exit
 menu hide
diff --git a/templates/boot/isolinux/addons_list.cfg b/templates/boot/isolinux/addons_list.cfg
new file mode 100644 (file)
index 0000000..f546b5d
--- /dev/null
@@ -0,0 +1 @@
+# will be generated by grml-live
index 393cafe..e5284c1 100644 (file)
@@ -6,6 +6,8 @@
 ################################################################################
 # File Overview:
 # - addons.cfg       -> configuration file for /boot/addons/ (only used if NO_ADDONS not set)
 ################################################################################
 # File Overview:
 # - addons.cfg       -> configuration file for /boot/addons/ (only used if NO_ADDONS not set)
+# - addons_list.cfg  -> list of entries for addon menu
+# - addon_*          -> definition for entries in the addon menu
 # - boot-beep.msg    -> bootsplash config for console version sending beep sound
 # - boot.msg         -> bootsplash config for console version (no graphical boot menu)
 # - console.cfg      -> console version configuration of isolinux (no graphical boot menu)
 # - boot-beep.msg    -> bootsplash config for console version sending beep sound
 # - boot.msg         -> bootsplash config for console version (no graphical boot menu)
 # - console.cfg      -> console version configuration of isolinux (no graphical boot menu)