init 0 and init 6 do nothing 19 July 2022, 20:45:06 Hi forum :-)Coming from Gentoo, I use "init 0" to shutdown my system on the console and "init 6" to reboot it from the console. The same also works on Debian, Devuan etc.On my new Artix/OpenRC installation, those two commands do nothing. Using "halt now" or "shutdown" and "reboot" instead works though.Is it possible to use "init" for shutdown/reboot? Or why does "init" not do anything?Thanks for all clarification!
Re: init 0 and init 6 do nothing Reply #1 – 19 July 2022, 20:50:45 Quote from: l3u – on 19 July 2022, 20:45:06Hi forum :-)Coming from Gentoo, I use "init 0" to shutdown my system on the console and "init 6" to reboot it from the console. The same also works on Debian, Devuan etc.On my new Artix/OpenRC installation, those two commands do nothing. Using "halt now" or "shutdown" and "reboot" instead works though.Is it possible to use "init" for shutdown/reboot? Or why does "init" not do anything?Thanks for all clarification!use loginctl, so for example to shutdown issue loginctl poweroff
Re: init 0 and init 6 do nothing Reply #2 – 19 July 2022, 20:56:29 Yeah, that would be another (systemd style) option.But what about init?
Re: init 0 and init 6 do nothing Reply #3 – 19 July 2022, 23:53:33 Well, i for one don't require artix to be like every other distro in how it operates. I really like that it is in fact it's own unique easy to use distro.
Re: init 0 and init 6 do nothing Reply #4 – 20 July 2022, 10:49:59 Quote from: l3u – on 19 July 2022, 20:56:29Yeah, that would be another (systemd style) option.But what about init?Ok and? not everything systemd does is bad and the way that elogind does it is probably betterBesides what benefit is there to using init directly than to elogind?If you did try init [0-9] and it didn't work, check the logs to see if you can find anything.
Re: init 0 and init 6 do nothing Reply #5 – 20 July 2022, 13:33:27 Quote from: Lancia – on 20 July 2022, 10:49:59Ok and? not everything systemd does is bad and the way that elogind does it is probably betterI didn't say anything about this being bad – only that it's another alternative to what I already found.Don't get me wrong, I don't want Artix to be like other distros. I'm only interested why "init" simply does nothing. No entry in dmesg, nothing in the syslog. Simply nothing.I only want to understand this, as using "init" for halting or rebooting the system is the traditional Linux way to do it iirc.EDIT:Okay, it seems that Gentoo itself (in contrast to Artix/OpenRC) is actually not using OpenRC's own init but sysvinit (cf. https://wiki.gentoo.org/wiki/OpenRC/openrc-init ). And apparently, OpenRC's own init does not support commands like "init 0" or "init 6". One has to use openrc-shutdown (which is, iirc, executed by "shutdown", "reboot" etc.). Last Edit: 20 July 2022, 14:27:09 by l3u
Re: init 0 and init 6 do nothing Reply #6 – 20 July 2022, 14:35:59 Quote from: l3u – on 20 July 2022, 13:33:27Don't get me wrong, I don't want Artix to be like other distros. I'm only interested why "init" simply does nothing. No entry in dmesg, nothing in the syslog. Simply nothing.Well /usr/bin/init is just a symlink to whichever init binary (or script ?) you are using. In the case of openrc /usr/bin/openrc-initAnd running it from the command line produces no output as you say.It does have a man page if you wish to learn a little more about it.Code: [Select]man openrc-initQuoteI only want to understand this, as using "init" for halting or rebooting the system is the traditional Linux way to do it iirc.I'd say that was the SysVinit way of doing things not the Linux way of doing things. AFAIR the command init followed by a number changed the run level. Or was that telinit, or both ? I can't remember ? It's been a while.Other Artix supported init's may handle the init command differently ? IDK, I use openrc.Maybe Gentoo's version of openrc handles things differently than Artix if it was working there?
Re: init 0 and init 6 do nothing Reply #7 – 20 July 2022, 15:00:10 Yeah, I think this is because Gentoo uses sysvinit.From openrc-init's manpage: To use openrc-init configure your boot loader to invoke it or symlink it to /sbin/init. Also, you will need to use openrc-shutdown, to halt, reboot or poweroff the system. The default runlevel is read from the init command line, the rc_default_runlevel setting in rc.conf, the kernel command line, or it is assumed to be "default" if it is not set in any of these places.Apparently, openrc-init does not know numbered runlevels. Seems to be a sysvinit thing. I didn't know that.