0

According to man init(1) it is a --test option should be available. In fact when I am trying to test it I got an error

root@mst-sls:~# /sbin/init --test
/sbin/init: unrecognized option '--test'

What is it not recognized?

3

Also from man init:

For compatibility with SysV, if systemd is called as init and a PID
that is not 1, it will execute telinit and pass all command line
arguments unmodified. That means init and telinit are mostly equivalent
when invoked from normal login sessions. See telinit(8) for more
information.

So the way you're running init, all arguments are passed to telinit, and telinit does not have a --test option.

You can call systemd directly instead:

systemd --test
  • @l00p is that supposed to mean something? – muru Mar 30 '18 at 10:33
  • yes, does the statement systemd is called as init and a PID that is not 1 is correct if output of ps -P 1 is as follows 1 ? 00:00:01 systemd ? – l00p Mar 30 '18 at 10:41
  • @l00p and did you pass the --test option to systemd run as PID 1? – muru Mar 30 '18 at 11:03
  • I think that you mean that in my case systemd is not called as init. Does it mean that telinit(8) program is not passed anything? – l00p Mar 31 '18 at 12:53
  • @l00p no, what I meant is that, when you ran init --test, do you think that process's PID was 1? – muru Mar 31 '18 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.