logo       

Re: [uml-user] Passing environment parameter from command line: msg#00246

Subject: Re: [uml-user] Passing environment parameter from command line
On Fri, Feb 20, 2004 at 05:32:42PM +0800, - Kocil wrote:
> Dear all.
> 
> Is it posible to pass a variable from command line to an UML instance ?
> I mean, something like this. Launch UML from cmd line.
> 
> linux ubd0=root_fs  MYVARIABLE=values
> 
> Then inside the UML, we can get the MYVARIABLES back.

Just the same way as you do with a natively running linux: Arguments on
the command line which are not recognized by the kerenel are assed to
init.
So you can either evaluate them with init (good) or you can parse
/proc/1/environ (bad).

Regards,
 Thomas


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click


<Prev in Thread] Current Thread [Next in Thread>