Create directory /boot/grml for the iso images
[grml-rescueboot.git] / 42_grml
1 #! /bin/sh -e
2
3 # grub-mkconfig helper script.
4 # Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
5 #
6 # GRUB is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # GRUB is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
18
19 prefix=/usr
20 exec_prefix=${prefix}
21 bindir=${exec_prefix}/bin
22 libdir=${exec_prefix}/lib
23 . ${libdir}/grub/grub-mkconfig_lib
24
25 list=`for i in /boot/grml/*.iso ; do
26         if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
27       done`
28
29 for grmliso in $list ; do
30   echo "Found grml iso image: $grmliso" >&2
31   grml=`basename $grmliso`
32   title="Grml Rescue System ($grml)"
33
34   cat << EOF
35     menuentry "${title}" {
36     iso_path=$grmliso
37     export iso_path 
38     loopback loop $grmliso
39     set root=(loop)
40     configfile /boot/grub/loopback.cfg
41     }
42 EOF
43 done