Gentoo Archives: gentoo-dev

From: Wout Mertens <wmertens@g.o>
To: Martin Schlemmer <azarah@g.o>
Cc: Wolfram Schlich <lists@×××××××.org>, Gentoo-Dev mailinglist <gentoo-dev@g.o>
Subject: Re: [gentoo-dev] rc-scripts/init: new service dependency
Date: Tue, 06 May 2003 09:40:28
Message-Id: Pine.GSO.4.53.0305061129380.6252@bru-cse-075.cisco.com
In Reply to: Re: [gentoo-dev] rc-scripts/init: new service dependency by Martin Schlemmer
1 On Mon, 5 May 2003, Martin Schlemmer wrote:
2
3 > On Mon, 2003-05-05 at 22:23, Wolfram Schlich wrote:
4 >
5 > > What about a new dependency like "triggeredby"?
6 > > Another name could be "stickto"...
7 > > This would/should/could both affect "start" and "stop" operations. E.g.:
8 > >
9 > > /etc/init.d/ddclient:
10 > > -> triggeredby net.ppp0
11 > > -> after net.ppp0
12 > >
13 > > This would cause ddclient to be started when net.ppp0 is started, but
14 > > due to the "after" dep, it would be started *after* net.ppp0.
15 > > Kinda reverse/twisted need dependency... or something.
16 > >
17 > > This "triggeredby" could be applied to e.g. squid, iptables, postfix... all the
18 > > stuff you *might* choose to need when connecting to the internet but
19 > > don't want to start before you *really* connect.
20 > >
21 >
22 > Might be a good feature to support. I just do not like the name =)
23
24 How about subscribe? And you can ask to be called before and/or after the
25 script you subscribe to:
26
27 subscribe after net.ppp0
28
29 event() {
30 case $2 in
31 start|restart)
32 start
33 ;;
34 stop)
35 stop
36 ;;
37 esac
38 }
39
40 This would make runscript call ddclients event() after net.ppp0 was run,
41 with $1 set to the script, $2 set to the action and $3 set to before or
42 after.
43
44 Of course, this still doesn't fix having multiple ways of bringing up your
45 interface, like I proposed for gentoo-net (need to work on that :-/). My
46 proposal also took care of calling ddclient after the interface was up...
47
48 Wout.
49
50 --
51 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] rc-scripts/init: new service dependency Martin Schlemmer <azarah@g.o>