summaryrefslogtreecommitdiff
path: root/microkernel/viengoos/grub2-config.diff
blob: e4b1ef40810713569ea264350e5cfec71f51aa29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
2009-01-17  Neal H. Walfield  <address@hidden>

        * util/i386/pc/grub-mkrescue.in: Add new option --configfile.  If
        not the set and not the empty string, load it from the generated
        config file on boot.

Index: util/i386/pc/grub-mkrescue.in
===================================================================
--- util/i386/pc/grub-mkrescue.in	(revision 2148)
+++ util/i386/pc/grub-mkrescue.in	(working copy)
@@ -49,6 +49,7 @@
   --image-type=TYPE       select floppy or cdrom (default)
   --emulation=TYPE        select El Torito boot emulation type floppy
                           or none (default) (cdrom only)
+  --configfile=FILE       config file to load (default: none)
 
 grub-mkimage generates a bootable rescue image of the specified type.
 
@@ -93,6 +94,9 @@
             echo "Unknown emulation type \`$emulation'" 1>&2
             exit 1 ;;
         esac ;;
+    --configfile=*)
+       configfile=`echo "$option" | sed 's/--configfile=//'`
+        ;;
     -*)
 	echo "Unrecognized option \`$option'" 1>&2
 	usage
@@ -121,9 +125,15 @@
   ${aux_dir}/boot/grub/
 
 modules="biosdisk `cat ${input_dir}/partmap.lst` ${modules}"
-for i in ${modules} ; do
-  echo "insmod $i"
-done > ${aux_dir}/boot/grub/grub.cfg
+{
+  for i in ${modules} ; do
+    echo "insmod $i"
+  done
+  if test x$configfile != x
+  then
+    echo "configfile $configfile"
+  fi
+} > ${aux_dir}/boot/grub/grub.cfg
 
 for d in ${overlay}; do
   echo "Overlaying $d"