[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Regarding ENV variable
From: |
Colin Watson |
Subject: |
Re: Regarding ENV variable |
Date: |
Tue, 4 Jan 2011 10:46:26 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Mon, Jan 03, 2011 at 07:08:51PM +0530, Gnanasekar Loganathan wrote:
> i'm setting environment variable by set mycmd="knetbsd netbsd.g"
>
> if call my own command, end up with no argument error.
> grub> myboot $mycmd
> myboot: usage knetbsd <filename>
>
> if do echo $mycmd, getting the correct string
> grub> echo $mycmd
> knetbsd netbsd.g
>
> if i directly run, throw unknown command
> grub>$mycmd
> error: unknown command `knetbsd netbsd.g'.
>
> How do i pass 2 arguments from single env variable or how to run the
> env as command?
I don't think this is possible right now. We would need to have some
equivalent of the shell 'eval' builtin. The underlying pieces are
present (e.g. grub_script_execute_sourcecode) but aren't exposed in the
GRUB scripting interface.
If you aren't able to add this extension to GRUB script yourself and
propose a patch, I suggest reworking your code in some other form.
--
Colin Watson address@hidden