Gentoo Archives: gentoo-laptop

From: Will Briggs <will@××××××××××××××××××.au>
To: gentoo-laptop@l.g.o
Subject: Re: [gentoo-laptop] wireless and service dependencies
Date: Sat, 14 Apr 2007 00:35:30
Message-Id: 4620213B.3030406@burnieanglican.org.au
In Reply to: Re: [gentoo-laptop] wireless and service dependencies by Fabio A Correa
1 Fabio A Correa wrote:
2 > Hello,
3 >
4 > Study /etc/conf.d/net.example and write a postup() function in /etc/conf.d/net ; Postup is my
5 > preferred way of starting sshd and ntpd, because my wireless network is managed by
6 > wpa_supplicant. Then, when I move my laptop from an access point to another, such services must
7 > be restarted. Nothing better than having Gentoo restarting such services for you.
8 >
9 > Here goes an example:
10 >
11 > postup () {
12 > /etc/init.d/ntpd restart
13 > /etc/init.d/sshd restart
14 > /etc.init.d/cupsd restart
15 > }
16
17 G'day Fabio,
18
19 Thanks for the post. I'll have a play with this ASAP...
20
21 I guess the idea here is that you take /etc/init.d/foo out of the init
22 runlevels and let this postup function handle it - that way you don't
23 have any "WARNING: foo scheduled start..." messages on boot up.
24
25 So this would be a fix, but it doesn't actually attack the problem of
26 net.* service dependencies handled by runscript.sh, yes?
27
28 Only problem I see with this is this:
29
30 1) wireless (eth1) comes up - sshd (re)starts and all is well.
31 2) I ssh into the laptop from another machine
32 3) the cat-5 wire gets plugged in for some reason and eth0 comes up -
33 sshd restarts
34 4) The connection I had in 2) is lost, even though the link isn't.
35
36 Or have I got the wrong end of the stick here?
37 I'll have a play...
38
39 Thanks again,
40
41 W.
42 --
43 gentoo-laptop@g.o mailing list