On Thu, Apr 21, 2011 at 04:31:46AM +0200, Jeroen Roovers wrote:
> On Wed, 20 Apr 2011 22:02:41 +0400
> Peter Volkov <[email protected]> wrote:
> 
> > В Срд, 20/04/2011 в 12:24 -0500, William Hubbs пишет:
> > > The author of the bug feels that the way to fix this is for us to
> > > put a check in openrc that makes it refuse to run services if it
> > > was not used in the boot process.
> 
> Why refuse? It could instead assume it needed to only start a service
> in, say, a chroot, like ssh or apache2, without assuming anything else
> needs to be done. If the service needed anything else, it could be
> left to fail on its own terms.
 
 This might be possible; I would just change the message in the patch
 provided to something like,

"Warning, openrc did not boot this system, so you may get unpredictable 
results.\n"

> > This is good idea to have in any case since I remember my system went
> > crazy after I've tried to start some service inside chroot.
> 
> Basically, baselayout/openrc (baselayout-1 has the same problem) would
> (try to) shut down your system because it thought something was
> terribly wrong. That's bitten me as well when I still thought I could
> test services inside a chroot.
> 
> > > This may work; however, I do not feel that it addresses the root
> > > cause of the bug. I feel that the root cause is packages
> > > unconditionally installing udev rules which assume everyone uses
> > > openrc.
> 
> How should the udev rules be changed to match /any/ init system?

For an example of the problem, take a look on your system at
/lib/udev/rules.d/90-network.rules. This is part of openrc's hotplug
functionality. Basically it tries to run
/etc/init.d/net.$INTERFACE start when a network interface is added to
the system and rc_hotplug allows it.
 
In net-wireless/bluez, you will see similar integration between openrc
and udev. Once bluez is installed, /lib/udev/rules.d/70-bluetooth.rules
runs bluetooth.sh which tries to run a service in /etc/init.d.

To make things work with /any/ init system, the best way to go would be
to make it a practice not to run services from within udev rules or
external run scripts like net.sh and bluetooth.sh in /lib/udev.

William

Attachment: pgpxxqE40HLZO.pgp
Description: PGP signature

Reply via email to