[syslinux] Issues with syslinux_run_command(str) and parameters
Ady
ady-sf at hotmail.com
Tue Apr 29 19:06:55 PDT 2014
>
> I did confirm earlier that this does work, and combined with a MENU
> HIDDEN to hide it from the visible menu it is a possible solution. I
> originally assumed that this was due to that going down a different
> code path and did not mention it, apologies. The scale of my menu
> makes doubling/tripling menu entries less ideal, though.
>
>
> Do we consider it intended functionality that modules such as
> whichsys will not work under ALLOWOPTIONS 0? A strict reading of the
> wiki would allow for this, as the subsequently loaded module does not
> have parameters in an append
> label: http://www.syslinux.org/wiki/index.php/SYSLINUX#ALLOWOPTIONS_fl
> ag_val
>
>
> Naturally given my situation here, I think it would be ideal if we
> could separate disabling user edits & commands from blocking modules
> loading other modules, etc. :)
>
> --Ian
Just FYI... You could potentially avoid MENU HIDDEN. A different
directive, MENU HIDE, might be convenient. It all depends on the
whole set of cfg files, and on your goals. For example:
LABEL sys
MENU HIDE
LINUX memdisk
INITRD myimage
APPEND floppy raw
Regarding "ALLOWOPTIONS 0"...
It is not blocking modules. And this directive can also be used in
CLI too, without a menu.
In particular, these tests show you that it is not blocking
whichsys.c32.
You might want to read the meaning of this directive as: "only allow
LABELs (as-is) to be executed", but that would be slightly
inaccurate, as any (type of) command can be executed, as long as it
doesn't need additional arguments.
So, if we use "ALLOWOPTIONS 0", the following command (from CLI) is
not allowed:
cat.c32 help.txt
just because "cat.c32" needs an additional argument, a file
("help.txt").
In case we had an entry in the cfg file such as:
LABEL cat_help
COM32 cat.c32
APPEND help.txt
then we could execute the command:
cat_help
which doesn't need additional arguments.
We could also execute "ls.c32", because it doesn't need additional
arguments.
In your example, 'memdisk' requires additional arguments (at least
the "initrd"). So, if you define a LABEL entry for the exact command,
you should be able to execute it (by means of the corresponding
"label").
Regards,
Ady.
More information about the Syslinux
mailing list