Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: openrc use flag
Date: Thu, 21 Apr 2011 04:36:00
Message-Id: 20110421043459.GA14245@linux1
In Reply to: Re: [gentoo-dev] rfc: openrc use flag by Jeroen Roovers
1 On Thu, Apr 21, 2011 at 04:31:46AM +0200, Jeroen Roovers wrote:
2 > On Wed, 20 Apr 2011 22:02:41 +0400
3 > Peter Volkov <pva@g.o> wrote:
4 >
5 > > В Срд, 20/04/2011 в 12:24 -0500, William Hubbs пишет:
6 > > > The author of the bug feels that the way to fix this is for us to
7 > > > put a check in openrc that makes it refuse to run services if it
8 > > > was not used in the boot process.
9 >
10 > Why refuse? It could instead assume it needed to only start a service
11 > in, say, a chroot, like ssh or apache2, without assuming anything else
12 > needs to be done. If the service needed anything else, it could be
13 > left to fail on its own terms.
14
15 This might be possible; I would just change the message in the patch
16 provided to something like,
17
18 "Warning, openrc did not boot this system, so you may get unpredictable results.\n"
19
20 > > This is good idea to have in any case since I remember my system went
21 > > crazy after I've tried to start some service inside chroot.
22 >
23 > Basically, baselayout/openrc (baselayout-1 has the same problem) would
24 > (try to) shut down your system because it thought something was
25 > terribly wrong. That's bitten me as well when I still thought I could
26 > test services inside a chroot.
27 >
28 > > > This may work; however, I do not feel that it addresses the root
29 > > > cause of the bug. I feel that the root cause is packages
30 > > > unconditionally installing udev rules which assume everyone uses
31 > > > openrc.
32 >
33 > How should the udev rules be changed to match /any/ init system?
34
35 For an example of the problem, take a look on your system at
36 /lib/udev/rules.d/90-network.rules. This is part of openrc's hotplug
37 functionality. Basically it tries to run
38 /etc/init.d/net.$INTERFACE start when a network interface is added to
39 the system and rc_hotplug allows it.
40
41 In net-wireless/bluez, you will see similar integration between openrc
42 and udev. Once bluez is installed, /lib/udev/rules.d/70-bluetooth.rules
43 runs bluetooth.sh which tries to run a service in /etc/init.d.
44
45 To make things work with /any/ init system, the best way to go would be
46 to make it a practice not to run services from within udev rules or
47 external run scripts like net.sh and bluetooth.sh in /lib/udev.
48
49 William

Replies

Subject Author
Re: [gentoo-dev] rfc: openrc use flag William Hubbs <williamh@g.o>