* Alex Efros [2006-02-14 16:08:58 +0200]: > > AFAIK, programs like apcupsd and nut probably do. Not aware of any > > others, however. > > Thanks, it has sense. > > > Doesn't Gentoo have a blacklist? Ie. tell it not to emerge a new > > sysvinit if it comes across one? That would be my first suggestion. I > > seriously doubt that shutdown/reboot/halt really need to be recompiled > > that often. > > Hehehe. Gentoo wanna recompile everything from time to time, it just like > how compilation looks like... lines go up, CPU working, admin feel nervous... :) Never really used Gentoo, so can't say... =) But unnecessary recompiling seems a little silly to me. > I've tried to blacklist (package.mask in Gentoo terminology) sysvinit, but > then emerge start complaining what it unable to merge 'critical system > package'... ;-) Giving init= param to kernel sounds ease than fighting > with emerge from time to time. You're right... passing init= is probably easier. > > You can still use sysvinit's shutdown/reboot/etc. with runit. No need > > for the aliases or even reconfigured acpid. They'll work just fine. > > You might get a sporadic "can't communicate with /dev/initctl" message > > when you type reboot or halt, but that's not really a problem (I've just > > patched that out for Annvix to prevent people from getting concerned > > over nothing). > > > > The solution of booting the kernel with init=/sbin/runit-init would work > > in and of itself, if you can't blacklist sysvinit. No need for the > > aliases and other stuff. > > Nope. I've just executed: > > home ~ # /sbin/reboot > WARNING: could not determine runlevel - doing soft reboot > (it's better to use shutdown instead of reboot from the command line) > > Broadcast message from root (pts/5) (Tue Feb 14 16:05:34 2006): > > The system is going down for reboot NOW! > shutdown: /dev/initctl: No such file or directory > init: /dev/initctl: No such file or directory > home ~ # /sbin/halt > WARNING: could not determine runlevel - doing soft halt > (it's better to use shutdown instead of halt from the command line) > > Broadcast message from root (pts/5) (Tue Feb 14 16:05:37 2006): > > The system is going down for system halt NOW! > shutdown: /dev/initctl: No such file or directory > init: /dev/initctl: No such file or directory > > and THEN go to write this email... guess what? it doesn't work (except > spamming all xterms with 'Broadcast message' - that is working). :-) Poking in my subversion rep here, I see I made a patch to workaround that so I guess it doesn't work "out of the box". It's the runlevel issue that's the culprit. The patch is here: http://svn.annvix.org/cgi-bin/viewcvs.cgi/releases/1.2-CURRENT/SysVinit/SOURCES/sysvinit-2.85-avx-silent_no_runlevel.patch?root=packages&rev=4797&view=log The problem is in halt.c it looks to see what runlevel you're in and if you're *not* in runlevel 0 or 6, it'll do the reboot stuff. Obviously with runlevel reporting: [vdanen@build ~]$ /sbin/runlevel unknown it doesn't let you do much. I just patched it to remove the checks for the runlevel and it does work here. Not sure how easy it is to put your own custom patches into Gentoo tho. -- Annvix - Secure Linux Server: http://annvix.org/ "lynx -source http://linsec.ca/vdanen.asc | gpg --import" {FEE30AD4 : 7F6C A60C 06C2 4811 FA1C A2BC 2EBC 5E32 FEE3 0AD4} Wasting time like it was free...