OpenRC / openrc

The OpenRC init system
BSD 2-Clause "Simplified" License
1.47k stars 247 forks source link

openrc-shutdown wrong fd? #152

Open udeved opened 7 years ago

udeved commented 7 years ago

When shutting down with 0.27.2 using openrc-init, the shutdown actually doesn't show the services stopped, no openrc related stuff displayed. Basically no openrc statuses on shutdown. I only get NM or acpid messages displayed on shutdown. Is this a bug, wrong fd, or do I have overlooked a setting?

cromerc commented 7 years ago

You are in the wrong terminal. I get those same messages in tty7. In tty1 the openrc messages appear during shutdown.

udeved commented 7 years ago

On what tty is your lightdm starting @cromerc ? My sddm starts on tty7 like gentoo.

cromerc commented 7 years ago

I have lightdm running on tty7 as well. But my point is that during shutdown/reboot it doesn't switch back to tty1 which is why we don't see the openrc messages. It used to switch to tty1 at shutdown when I ran consolekit, so this is a elogind issue I believe.

udeved commented 7 years ago

Right, if I downgrade to sysvinit and openrc-0.26.x, I get tty1 output on shutdown.

cromerc commented 7 years ago

Under 0.27.2 with sysvinit it still switched to tty1. The 2 changes I made were switch to elogind and to openrc-init. So if the problem isn't with elogind it means that openrc-init does not switch me back to tty1 during shutdown/restart.

cromerc commented 7 years ago

Most likely related: https://github.com/artix-linux/artix-linux.github.io/issues/8

thefallenrat commented 7 years ago

So uhhhmmm....On #openrc irc. I saw @williamh asking to @cromerc what is missing from openrc-init that makes it work, but he's disconnected from IRC before @cromerc could reply. So I'm just gonna paste here...

ccromer: WilliamH: not sure what is missing, but looking at xdm script it calls fgconsole which returns the current console number. Under sysvinit it is returning 1, and under openrc-init it is returning 7. Not sure why

udeved commented 6 years ago

I totally forgot about, this issue can be closed. The reason was the xdm script which came from gentoo, but was made for sysvinit initab. after removing the stuff, xdm behaves as expected on shutdown, and we get openrc messages shown.

amano-kenji commented 2 years ago

I still have to manually switch to tty1 before reboot or shutdown if sysv-utils USE flag is enabled in openrc.

What is wrong with openrc-init?

cromerc commented 2 years ago

I still have to manually switch to tty1 before reboot or shutdown if sysv-utils USE flag is enabled in openrc.

What is wrong with openrc-init?

If you are using "sysv-utils" you shouldn't be using openrc-init, you should be using sysvinit obviously. openrc-init should be used when sysvinit is not used.

amano-kenji commented 2 years ago
$ equery u openrc
sysv-utils : Install sysvinit compatibility scripts for halt, init, poweroff, reboot and shutdown

This USE flag makes openrc mimick sysvinit.

Also, sysv-utils USE flag in openrc deletes sysvinit.

cromerc commented 2 years ago

Sorry, was under the impression you were using sysvinit.