At Sat, 26 Jan 2002 15:21:18 +0100, Han Holl wrote: > I distribute a new kernel occasionally, remove the oldest, > and must declare the newest default. > Our users must not be allowed to boot the wrong kernel > accidentally, but I want to keep those as backup. > This is all done by scripting, and I just have the impression > that scripting migth be easier with a LILO compatibilty > mode.
That's true in your case, as you chose the LILO way. Generally speaking, however, GRUB is much more flexible. I think it always makes things complex to obtain flexiblity (e.g. consider autoconf vs. imake), and that's not so bad to have as a trade-off. Anyway, I can write what you need very easily: [add-kernel menu.lst title kernel_cmdline] #! /bin/sh menu=$1 title=$2 kernel=$3 tmp=/tmp/sed-script-$$ # Find the first occurrence of entries. where=`sed -n /title/= $menu | head -1` # Make a sed script temporarily. cat >$tmp <<EOF /lock/d $where i\\ title $title\\ kernel $kernel\\ /title/a\\ lock EOF # Execute it. sed -f $tmp $menu # Cleanup. rm -f $tmp [EOF] Okuji _______________________________________________ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub
