[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Understanding /etc/inittab
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2010-12-25 22:57:17
Message-ID: 201012252357.17225.vda.linux () googlemail ! com
[Download RAW message or body]

On Saturday 25 December 2010 19:43, Sameer Naik wrote:
> Hi,
> 
> I have been going through the inittab script for various filesystems.
> I have noticed that quite a few of them specify the sysint line as
> follows:
> 
> ::sysinit:-/etc/init.d/rcS
> 
> I would like to know what the '-' character before the action is for.
>
> I imagined it was to specify a login environment. I am not sure
> though. Earlier when i was trying to launch an application in the
> background through an init.d script, the application would just not
> launch. When i removed the '-' character from the above line, i was
> able to do so.
> 
> Today i found that if i keep the '-' character and launch the
> application in the background using start-stop-daemon, it works fine.

It makes init try to acquire a controlling tty for the command before
running it. If "acquire ctty" doesn't work, init runs the command
anyway.
 
> Lastly, the PATH i have specified in the /etc/profile does not seem to
> be available in the rcS scripts, including mdev hotplug scripts. I
> have to specify the additional paths in rcS and hotplug scripts.

/etc/profile is loaded by login shell only.
Login shell is one which has '-' as a first char of its argv[0],
or one started with -l option.

-- 
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic