On Wed, 13 Jun 2018 17:59:19 -0300
Matias Fonzo <s...@dragora.org> wrote:

> On Wed, 13 Jun 2018 17:29:48 -0300
> Jesse Smith <jsm...@resonatingmedia.com> wrote:
> 
> > On 06/13/2018 05:01 PM, Matias Fonzo wrote:  
> > > According to init(8):
> > >
> > > [..]
> > >
> > > ENVIRONMENT
> > > Init sets the following environment variables for all its
> > > children:
> > >
> > > RUNLEVEL
> > >        The current system runlevel.
> > > [..]
> > >
> > > Probably there is no need to write/read such file...
> > >    
> > 
> > While that is true, in this case reboot/halt would not be a direct
> > child of init. If you have a shell open and run "echo $RUNLEVEL" you
> > will probably find the variable is not set, unless your shell is a
> > direct descendant of init. That is why I think having the value
> > stored in a specific, non-volatile location.
> > 
> >   
> 
> I'm curious, why shutdown need to determine the runlevel?.
> 

I found the notes on the halt manpage.  Interesting.


Reply via email to