BTS

Message4467

Author sebastian.steinhuber
Recipients bugs, sebastian.steinhuber
Date 2012-10-04.03:21:13
Content
Dear grml folks,

it's just more a wish-list item than a bug.
I'd like to use a variable (called flavor) in my /etc/grub.d/40-custom
like that:

menuentry "Grml rescue system, ia32 (ISO = grml96-full_2012.05.iso,
hd0,2)" {
    set isodev="(hd0,2)"
    set isofile="/fromiso/grml96-full_2012.05.iso"
    set flavor="grml32full"
    loopback loop $isodev/$isofile
    linux (loop)/boot/$flavor/vmlinuz boot=live debnet
dns=192.168.0.4,192.168.0.5 findiso=$isofile
hostname=vnb4.achtbits.intern. ignore_bootid
ip=192.168.0.204:192.168.0.64:192.168.0.1:255.255.255.0:vnb4:eth0:on
keyboard=de lang=de live-media-path=/live/grml32-full log noautoconfig
nobeep noconsolefont nodhcp nodmraid noeject nolvm nomce nomodem
noprompt noraid quiet tz=Europe/Berlin vga=791
    initrd (loop)/boot/$flavor/initrd.img
}

It's working fine, but it would be even easier to maintain regarding
future updates if the option live-media-path= could be controlled by
$flavour, too, just like
 linux (loop)/boot/$flavor/vmlinuz … live-media-path=/live/$flavor
 initrd (loop)/boot/$flavor/initrd.img …
instead of
 linux (loop)/boot/$flavor/vmlinuz … live-media-path=/live/grml32-full
 initrd (loop)/boot/$flavor/initrd.img …

… assuming kernel and initrd names won't change ;-), I'd only have to
change the menuentry line and the image filename in case of supplying an
grml upgrade to my machines.
Thanks for your considerations,

Sebastian
History
Date User Action Args
2012-10-04 03:21:14sebastian.steinhubersetrecipients: + sebastian.steinhuber
2012-10-04 03:21:14sebastian.steinhuberlinkissue1213 messages
2012-10-04 03:21:13sebastian.steinhubercreate