Re: Can anyone explain the use of init3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19/04/06, Styma, Robert E (Robert) <stymar@xxxxxxxxxx> wrote:
>
> >
> >
> > >Prefer 'telinit 3' to 'init 3', telinit is used to change
> > run levels, and
> > >shuts down services assoicated with the current run level.
> > >

> > >
> > On my FC5 install telinit is symlinked to init, so no odds in
> > which gets
> > used.
> >
> Be aware that some programs look at what name they are called and
> behave differently.  I do not know about telinit, but as an example,
> slocate and updatedb are the same program (updatedb is a soft link).
>

Well, this motivated me to check, the manpage claims that telinit/init
has an unsual method for working out what it should do (rather than
checking it's invocation name á la slocate, gzip etc.):

"TELINIT
       /sbin/telinit is linked to /sbin/init.  It takes a one-character  argu-
       ment and signals init to perform the appropriate action.

...

"The init binary checks if it is init or telinit by looking at its process
id; the real init's process id is always 1.  From this it  follows that
instead of calling telinit one can also just use init instead as a
shortcut."

Which is funny, because I'm sure this caused me problems the first
time I tried adding services to run levels, but there you go.

--
imalone


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux