From: Vincent Danen <vdanen@linsec.ca>
Subject: Re: copy runit-init to /sbin/init or not
Date: Mon, 13 Feb 2006 23:04:03 -0700 [thread overview]
Message-ID: <20060214060403.GF27964@annvix.org> (raw)
In-Reply-To: <20060214054251.GH6585@home.power>
[-- Attachment #1: Type: text/plain, Size: 2786 bytes --]
* Alex Efros <powerman@powerman.asdfGroup.com> [2006-02-14 07:42:51 +0200]:
> > * Gerrit Pape <pape@smarden.org> [2006-02-13 14:44:31 +0000]:
> > > Yes, runit-init must be /sbin/init. It's that /sbin/init on unix is not
> > > only used as process 1, but also as command line interface while the
> > > system is up (e.g. 'init 0', 'init 6'). With runit, the process no 1
> > > duties are implemented in the runit program, and the cli in runit-init.
> > > runit-init is installed as /sbin/init, and if it sees itself started
> > > with pid 1, it immediately replaces itself with /sbin/runit, the process
> > > no 1 implementation. If it's not running as pid 1, it's the command
> > > line interface to signal the (currently as process no 1 running) runit
> > > process.
>
> Do you aware of any software which run 'init [0|6]' or 'halt' or 'reboot'?
> For now I've seen these commands executed only manually by root and by
> acpid daemon.
AFAIK, programs like apcupsd and nut probably do. Not aware of any
others, however.
> I've problems with installing runit-init as /sbin/init on my Gentoo - this
> is because from time to time while upgrading overall system 'sysvinit' package
> become upgraded and it replace /sbin/init. If I forget to replace it
> by runit-init manually again, I got surprise on next reboot. :-(
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.
> Currently I work around this issue this way:
> - /sbin/{init,halt,reboot} is sysvinit's
> - kernel boot with param init=/sbin/runit-init
> - there aliases configured in /root/.bashrc:
> alias reboot='/sbin/runit-init 6'
> alias halt='/sbin/runit-init 0'
> (I usually use reboot|halt, not init 0|6, but alias for init also can be
> added if needed)
> - acpid configured to run '/sbin/runit-init 0' in it /etc/acpi/default.sh
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.
--
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...
[-- Attachment #2: Type: application/pgp-signature, Size: 186 bytes --]
next prev parent reply other threads:[~2006-02-14 6:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-02 4:20 runit upgrades and halt rather than reboot Vincent Danen
2006-02-03 15:40 ` Gerrit Pape
2006-02-03 16:45 ` Vincent Danen
2006-02-03 16:55 ` Gerrit Pape
2006-02-03 17:04 ` Vincent Danen
2006-02-11 19:03 ` Vincent Danen
2006-02-11 19:11 ` Paul Jarc
2006-02-11 19:44 ` Vincent Danen
2006-02-13 14:44 ` Gerrit Pape
2006-02-14 4:08 ` Vincent Danen
2006-02-14 5:22 ` Joshua N Pritikin
2006-02-14 5:42 ` copy runit-init to /sbin/init or not Alex Efros
2006-02-14 6:04 ` Vincent Danen [this message]
2006-02-14 14:08 ` Alex Efros
2006-02-14 18:49 ` Vincent Danen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060214060403.GF27964@annvix.org \
--to=vdanen@linsec.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).