[BusyBox] ash running /etc/profile when started from inittab, take II

Robert Griebl griebl at gmx.de
Mon Jul 22 09:52:03 UTC 2002


On Monday 22 July 2002 17:43, Vladimir N. Oleynik wrote:
> Rich,
>
> > Sometimes it seems that the simpler the command, the more difficult
> > it is to get it right.
> >
> > Here's my second try at getting /etc/profile to run at ash startup
> >
> > when ash is started from inittab:
> > ::respawn:/bin/sh -sc ". /etc/profile" </dev/ttyS0 >/dev/ttyS0
> > :: 2>/dev/ttyS0
> >
> > (I added the "." command so that the settings in /etc/profile would
> > remain in effect after the script finished)
>
> ;)
> Busybox init have special mode for equivalent your example
> ttyS0::askfirst:-/bin/sh
> But I not right.
> sh calling with "-sh" by login util.
>

As vodz said: when called from init use the "-sh" or "-/bin/sh" notation -- 
when called from the command line, use "ash --login"

cu
Robert




More information about the busybox mailing list