On Tue, Nov 17, 2015 at 8:54 AM, Arbiel (gmx) <[email protected]> wrote: > Hi > > I'm using Grub2 (v2.00). > > In a configfile'd configuration file, I've inserted the following line > > if [ keystatus --ctrl -a -f "${prefix}/greffons/menuentry.cfg" ]; > then source "${prefix}/greffons/menuentry.cfg"; fi;
You're making a common bash programming mistake, explained here: http://mywiki.wooledge.org/BashPitfalls#if_.5Bgrep_foo_myfile.5D (grub-script is modeled off of bash syntax). > > To my understanding, this means " if the control key is pressed down and > the requested file exists, then source the file. To achieve that in grub-script you could use the following: if keystatus --ctrl; then if [ -f ${prefix}/greffons/menuentry.cfg" ]; then source "${prefix}/greffons/menuentry.cfg" fi fi -- Jordan Uggla (Jordan_U on irc.freenode.net) _______________________________________________ Help-grub mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-grub
