Gentoo Archives: gentoo-user

From: heini <dirk.heinrichs@××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Adding dependencies in init scripts
Date: Thu, 11 Feb 2010 21:23:49
Message-Id: 201002112222.50699.dirk.heinrichs@online.de
1 Am Donnerstag 11 Februar 2010 18:00:09 schrieb Neil Bothwick:
2 > On Thu, 11 Feb 2010 13:15:04 +0100, Damian wrote:
3 > > > I found this by looking in the cups init script. It should help.
4 > > >
5 > > > depend() {
6 > > > use net
7 > > > need avahi-daemon dbus
8 > > > before nfs
9 > > > after logger
10 > > > }
11 > >
12 > > I've tried putting "after mpdscribble" without success. Also the
13 > > problem with this approach is that if I update mpd, I will have to
14 > > modify the init script again.
15 >
16 > That only means that is mdscribble is in the runlevel, start mpd after
17 > it. Try "need mpdscribble". The handbook and one of the man pages explain
18 > these options.
19 >
20 > You can add /etc/init.d to CONFIG_PROTECT and remove it from
21 > CONFIG_PROTECT_MASK in make.conf.
22 >
23 > Or you could remove mpd from the default runlevel and call both the init
24 > scripts from /etc/conf.d/local.
25
26 Nope. Lookup /etc/rc.conf:
27
28 ##############################################################################
29 # SERVICE CONFIGURATION VARIABLES
30 # These variables are documented here, but should be configured in
31 # /etc/conf.d/foo for service foo and NOT enabled here unless you
32 # really want them to work on a global basis.
33
34 # Some daemons are started and stopped via start-stop-daemon.
35 # We can set some things on a per service basis, like the nicelevel.
36 #export SSD_NICELEVEL="-19"
37
38 # Pass ulimit parameters
39 #rc_ulimit="-u 30"
40
41 # It's possible to define extra dependencies for services like so
42 #rc_config="/etc/foo"
43 #rc_need="openvpn"
44 #rc_use="net.eth0"
45 #rc_after="clock"
46 #rc_before="local"
47 #rc_provide="!net"
48
49 # You can also enable the above commands here for each service. Below is an
50 # example for service foo.
51 #rc_foo_config="/etc/foo"
52 #rc_foo_need="openvpn"
53 #rc_foo_after="clock"
54
55 # You can also remove dependencies.
56 # This is mainly used for saying which servies do NOT provide net.
57 #rc_net_tap0_provide="!net"
58
59 HTH...
60
61 Dirk

Replies

Subject Author
Re: [gentoo-user] Adding dependencies in init scripts Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] Adding dependencies in init scripts Damian <damian.only@×××××.com>