Hi everybody,

I'd like to add a value to a user variable in 00_header but I get the error "not an assignment".
but if I echo directly the value everything works fine.

What can I do? How can I use a variable my_variable? Is there another way to check for different values of \$? ?

Any help would be appreciated.

Greetings
Joachim


this is what is working fine:

checkfrontkeys
echo "pressed key: \$?"


-------------

this is what I'm struggling with (I've also been trying to use "case \$? "instead of "if $pressed_key" but this didn't work neither):

checkfrontkeys
set pressed_key = $?
echo "pressed key: "
echo $pressed_key
echo "\n"

if [ $pressed_key == 1 ]; then
    echo "pressed 1"
    set default="1"
elif [ $pressed_key == 2]; then
    echo "pressed 2"
    set default="2"
elif [ $pressed_key == 3]; then
    echo "pressed 3"
    set default="3"
elif [ $pressed_key == 4]; then
    echo "pressed 4"
    set default="4"
else
    echo "nothing pressed\n"
    set default="6"

fi

echo "default = ${default}\n"
echo "after checkfrontkeys"





_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to