On my system, built with sys-apps/openrc[sysv-utils], the /sbin/{shutdown,reboot} binaries are scripts calling /sbin/openrc-shutdown. When I'm dropped into a dracut shell due to booting issues, using these commands doesn't work for obvious reasons: the openrc-init daemon isn't running, and the openrc-shutdown binary isn't present. I wonder if there's a way to coerce dracut into installing useful programs here, allowing me to exit out of a rescue shell properly.
Seems like something for the OpenRC project to fix. Making these shell scripts is unexpected; neither sysvinit nor systemd does that.
As a workaround you can pass "--install openrc-shutdown" to dracut command or add install_optional_items+=" openrc-shutdown " to dracut.conf/dracut.conf.d
(In reply to Alexander Tsoy from comment #2) > install_optional_items+=" openrc-shutdown " I wonder if it is OK for openrc to drop config into /usr/lib/dracut/dracut.conf.d with the content above. Saddly, we currently don't have eclass function for querying dracutconfdir
I would like to note that "openrc-shutdown" doesn't work either, as openrc-init was never started (and it expects to communicate with that)
(this is also why I suggested the dracut package fix this - surely it can be made to install a script that actually does something?) (though I guess openrc could also detect when openrc-init isn't running and do something sensible with the information)
(In reply to Esteve Varela Colominas from comment #5) > (this is also why I suggested the dracut package fix this - surely it can be > made to install a script that actually does something?) The OpenRC maintainer created this mess; I don't feel the need to clean it up. I think it would be better to make OpenRC function more like sysvinit with a multi-call binary instead of shell script hacks. If the OpenRC maintainer disagrees, they should fix dracut with patches upstream.
Didn't mean to invoke any animosity, but I meant mostly that there isn't really a guarantee about what /sbin/shutdown actually *is* and what it requires to run. Since no init process ought to be running in dracut (dracut *is* the init), I think it'd make sense for it to implement its own shutdown script. Though I agree something like that should be an upstream request, I figured I'd bounce it here first.