public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] rc-scripts/init: new service dependency
@ 2003-05-05 20:23 Wolfram Schlich
  2003-05-05 20:39 ` Martin Schlemmer
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Wolfram Schlich @ 2003-05-05 20:23 UTC (permalink / raw
  To: Gentoo-Dev mailinglist

Hi,

I just switched my internet gateway from a heavily handpatched SuSE 7.3 
to Gentoo 1.4rc4. So far it *works* :o)
My setup is:

	/etc/init.d/net.eth1 (PPPoE-device):
		-> provide net.eth-dsl (virtual provide)

	/etc/init.d/net.ppp0 (DSL-iface):
		-> need net.eth-dsl (virtual provide from net.eth1)
		-> provide net.internet (virtual provide)

	/etc/init.d/ddclient (DynDNS.org updater):
		-> need net.internet (virtual provide from net.ppp0)

This works *so far*:
--8<--
[root@chiron(pts/2):tmp]$ rcddclient start
 * Bringing eth1 up... [ ok ]
 * Starting pppd (ppp0)... [ ok ]
 * Starting DDClient... [ ok ]
[root@chiron(pts/2):tmp]$ rcnet.eth1 stop
 * Stopping DDClient... [ ok ]
 * Stopping pppd (ppp0)... [ ok ]
 * Bringing eth1 down... [ ok ]
[root@chiron(pts/2):tmp]$
--8<--

What I tried to do now is the following: when net.ppp0 is started,
ddclient should be started automatically as well. I've found no
dependency-way to do this (except making net.ppp0 need ddclient, which
turns out to be kinda logical loop, despite the fact it seems to work in
practice... still feels bad).

What about a new dependency like "triggeredby"?
Another name could be "stickto"...
This would/should/could both affect "start" and "stop" operations. E.g.:

	/etc/init.d/ddclient:
		-> triggeredby net.ppp0
		-> after net.ppp0

This would cause ddclient to be started when net.ppp0 is started, but
due to the "after" dep, it would be started *after* net.ppp0.
Kinda reverse/twisted need dependency... or something.

This "triggeredby" could be applied to e.g. squid, iptables, postfix... all the
stuff you *might* choose to need when connecting to the internet but
don't want to start before you *really* connect.

Comments please.
-- 
Wolfram Schlich; Friedhofstr. 8, D-88069 Tettnang; +49-(0)178-SCHLICH

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [gentoo-dev] rc-scripts/init: new service dependency
@ 2003-05-06 13:50 Daniel
  0 siblings, 0 replies; 13+ messages in thread
From: Daniel @ 2003-05-06 13:50 UTC (permalink / raw
  To: gentoo-dev

On Tue, 6 May 2003 02:36 pm, Frank Zschockelt wrote:
> That's no problem. Just add the line for ddclient to /etc/ppp/ip-up.

and change AUTOCFGFILES = "no" in /etc/conf.d/net.ppp0 otherwise
/etc/init.d/net.ppp0 will override it.

Maybe there could be an init.d structure in /etc/ppp/ip-up.d/ and get ip-up
 to call them? There as Wolfram mentioned are a few items that could go here.
 /etc/rc.firewall (for guarddog) iptables call maybe, fetchmail, sendmail,
 dyndns, "/usr/bin/wwwoffle -online and /usr/bin/wwwoffle -fetch" if using
 wwwoffled, /usr/sbin/gentoo-stats --update, /usr/sbin/pdnsd-ctl server 0 up
 (if using pdnsd - ref bug #20450), some icq online activiation, etc...

Those are most of the ones I've got in ip-up. The order realy has to be user
defined, or maybe some indication in priority? Ok I haven't thought that much
in detail.

Maybe this is too ppp specific. Does ISDN use /etc/ppp/ip-up? A per interface
is a more generic solution? too generic maybe. Ok I'm babling now - I'll stop
;-)

The "triggered by" solution may have applicablility elsewhere but say for
instance you use dial-on-demand in /etc/init.d/net.ppp0?


Daniel

GnuPG/PGP signed and encrypted email preferred
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x32A64DC8
Key fingerprint = 2300 3292 3351 9665 D41B DC20 4C34 9BB6 32A6 4DC8


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-05-09 20:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-05 20:23 [gentoo-dev] rc-scripts/init: new service dependency Wolfram Schlich
2003-05-05 20:39 ` Martin Schlemmer
2003-05-05 21:11   ` Wolfram Schlich
2003-05-06  9:40   ` Wout Mertens
2003-05-06 18:43     ` Martin Schlemmer
2003-05-06 19:59       ` Wout Mertens
2003-05-06 20:37         ` Martin Schlemmer
2003-05-06 23:56           ` Wout Mertens
2003-05-07  1:26             ` Daniel
2003-05-09 20:09             ` [gentoo-dev] online/offline rc-scripts - was: " Daniel
2003-05-06  5:06 ` [gentoo-dev] " Frank Zschockelt
2003-05-09 18:01 ` Wolfram Schlich
  -- strict thread matches above, loose matches on Subject: below --
2003-05-06 13:50 Daniel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox