autoexec.win

Bernd Petrovitsch bernd at petrovitsch.priv.at
Fri Feb 4 12:50:49 UTC 2011


Hi!

On Don, 2011-02-03 at 15:14 +0100, Harald Becker wrote:
[...] 
> > Can I set up a script file to be run as a preamble at the opening of any
> > shell by a C prog using a "system()" call?

And the system() C-library call has exactly what to with busybox?

> I'm not sure if I completely understand your requirements, but have you
> considered to use ENV script activation?
> 
> That is: Do ...
> 
> export ENV=/PATH/TO/YOUR/SCRIPT
> 
> ... and any ash invoked with this environment setting will run the
> specified script BEFORE executing any other commands ... does this fit
> your needs?
> 
> bash behaves a bit different on this, but has similar features. Just see
> ash/bash manual pages under the topic INVOCATION.

... or you start it simply with
system("/PATH/TO/YOUR/SCRIPT; /PATH/TO/YOUR/APP");

Perhaps you want to use "&&" instead of ";".

Bernd
-- 
Bernd Petrovitsch                  Email : bernd at petrovitsch.priv.at
                     LUGA : http://www.luga.at



More information about the busybox mailing list