grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Option handling in grub-mkconfig


From: Grégoire Sutre
Subject: Option handling in grub-mkconfig
Date: Fri, 21 May 2010 12:08:48 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100411 Icedove/3.0.4

Hi,

The processing of option `-o' in grub-mkconfig only works when
it is the first option.  The code is:

# Check the arguments.
for option in "$@"; do
    case "$option" in
[...]
    -o)
        shift
        grub_cfg=$1
        ;;
    --output=*)
        grub_cfg=`echo "$option" | sed 's/--output=//'`
        ;;


For instance:

grub-mkconfig -o /tmp/tata -o /tmp/titi
rm: invalid option -- 'o'
Try `rm --help' for more information.

grub-mkconfig --output=/tmp/tata -o /tmp/titi
rm: invalid option -- 'o'
Try `rm --help' for more information.


AFAICS, other scripts (grub-install, grub-mkrescue) only support the
long option (--output=FILE).

The simpler solution would be to get rid of `-o' in grub-mkconfig,
but this would break some user/distribution scripts (e.g. Debian's
update-grub).

What do you think?

Grégoire



reply via email to

[Prev in Thread] Current Thread [Next in Thread]