This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using aliases in redboot boot scripts


Answering my own question.....

It appears you can make the boot scripts inteligent with respect to
what startup type redboot is. eg a script of

{ROM} fis load redboot_ram
{ROM} go
{RAM} fis list
help

If you have a ROM version of redboot it would execute the first and
last command.  If you have a RAM version it would execute the third
and last command.

Looking at the code i think the intention was that {ROM} could only be
at the start of the line. Unfortunatly, there is a bug. The current
code will eat everything between { and } no matter where it is on the
line.

I have a fix for this, which will appear in a jumb patch i have for
redboot. This should appear soon.

         Andrew


On Mon, Aug 05, 2002 at 04:06:19PM +0200, Andrew Lunn wrote:
> Hi Gary, Mark, etc...
> 
> For a long while i have been using alias in redboot boot scripts. eg i
> have an alias %{tftp_boot} which performs a complete tftp. I've put
> the command %{tftp_boot} into the boot script and all works well.
> 
> Yesterday i updated to the latest anoncvs code for redboot and now
> this is broken. The function getc_script() is used to pass the script
> to the CLI. This function is discarding all charactors in the script
> between, and including, { and }. Hence its not possible to put alias
> in the boot script anymore,
> 
> 
> Before i hack this strange code out, i would like to know: Whats the
> purpose of this?
> 
>         Thanks
>                 Andrew
> 
> -- 
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
> 

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]