* Re: [gentoo-laptop] wireless and service dependencies
@ 2007-04-14 2:13 Master Control Program
0 siblings, 0 replies; 10+ messages in thread
From: Master Control Program @ 2007-04-14 2:13 UTC (permalink / raw
To: gentoo-laptop
Will Briggs <will@burnieanglican.org.au> wrote on Sat Apr 14 10:32:59 EDT 2007
> Only problem I see with this is this:
>
> 1) wireless (eth1) comes up - sshd (re)starts and all is well.
> 2) I ssh into the laptop from another machine
> 3) the cat-5 wire gets plugged in for some reason and eth0 comes up -
> sshd restarts
> 4) The connection I had in 2) is lost, even though the link isn't.
>
/etc/init.d/sshd restart
will only restart the daemon, and not the sessions.
End of line.
--
gentoo-laptop@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-laptop] wireless and service dependencies
@ 2007-04-12 23:34 Will Briggs
2007-04-13 0:43 ` david
2007-04-13 13:19 ` Fabio A Correa
0 siblings, 2 replies; 10+ messages in thread
From: Will Briggs @ 2007-04-12 23:34 UTC (permalink / raw
To: gentoo-laptop
G'day all,
I'm having this problem. During startup both sshd and ntpd are not
started with a warning: "scheduled to start when net.eth0 is started"
eth0 is my wired network interface, eth1 is my wireless interface.
I rarely used a wired network, often use the wireless network.
This behaviour is fine, to certain extent, because if net.eth0 comes up
I'd be happy to have sshd and ntpd start.
However, I also want them to start if and when net.eth1 comes up.
I have searched for a dependency setting somewhere but can't find. Can
anyone point me in the right direction?
Cheers,
W.
--
gentoo-laptop@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-laptop] wireless and service dependencies
2007-04-12 23:34 Will Briggs
@ 2007-04-13 0:43 ` david
2007-04-13 1:07 ` Will Briggs
2007-04-13 13:19 ` Fabio A Correa
1 sibling, 1 reply; 10+ messages in thread
From: david @ 2007-04-13 0:43 UTC (permalink / raw
To: gentoo-laptop
Will Briggs wrote:
> G'day all,
>
> I'm having this problem. During startup both sshd and ntpd are not
> started with a warning: "scheduled to start when net.eth0 is started"
>
> eth0 is my wired network interface, eth1 is my wireless interface.
>
> I rarely used a wired network, often use the wireless network.
>
> This behaviour is fine, to certain extent, because if net.eth0 comes up
> I'd be happy to have sshd and ntpd start.
>
> However, I also want them to start if and when net.eth1 comes up.
>
> I have searched for a dependency setting somewhere but can't find. Can
> anyone point me in the right direction?
>
> Cheers,
>
> W.
>
Did you;
# ln -s net.lo /etc/init.d/net.eth1
# rc-update add net.eth1 default
--
Powered by Gentoo/Linux
--
gentoo-laptop@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-laptop] wireless and service dependencies
2007-04-13 0:43 ` david
@ 2007-04-13 1:07 ` Will Briggs
2007-04-13 11:49 ` Mike Benson
0 siblings, 1 reply; 10+ messages in thread
From: Will Briggs @ 2007-04-13 1:07 UTC (permalink / raw
To: gentoo-laptop
david wrote:
> Will Briggs wrote:
>> G'day all,
>>
>> I'm having this problem. During startup both sshd and ntpd are not
>> started with a warning: "scheduled to start when net.eth0 is started"
>>
>> eth0 is my wired network interface, eth1 is my wireless interface.
>>
>> I rarely used a wired network, often use the wireless network.
>>
>> This behaviour is fine, to certain extent, because if net.eth0 comes up
>> I'd be happy to have sshd and ntpd start.
>>
>> However, I also want them to start if and when net.eth1 comes up.
>>
>> I have searched for a dependency setting somewhere but can't find. Can
>> anyone point me in the right direction?
>>
>> Cheers,
>>
>> W.
>>
> Did you;
> # ln -s net.lo /etc/init.d/net.eth1
Yes. (Well, on checking it wasn't /etc/init.d/net.eth1 -> net.lo but
/etc/init.d/net.eth1 -> /etc/init.d/net.lo. I've changed that but I
suspect it makes no difference having the path in the symlink)
> # rc-update add net.eth1 default
>
No - but deliberately. I think this may be where I, or the system is
confused. Because unlike a desktop it's not just a matter of bringing
up the /etc/init.d/net.* scripts. I don't want DHCP timeouts etc. when
booting off-line.
net.eth0 is brought up by netplug
net.eth1 is brought up by as I understand it, the ipw3945 module being
loaded which runs the ipw3945 daemon, which runs wpa_supplicant, which
runs the init script (maybe those last two steps are vice versa)
So, currently:
/etc/init.d/net.eth0 status
* status: inactive
(which is fine, the wire isn't plugged in)
/etc/init.d/net.eth1 status
* status: started
which is fine, but I want sshd and ntpd to have recognised this
In the end I want the services brought up when either or both of
net.eth0 or net.eth1 are started (by cables being plugged in or wireless
networks coming up etc.)
Thanks for the response,
W.
--
gentoo-laptop@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-laptop] wireless and service dependencies
2007-04-13 1:07 ` Will Briggs
@ 2007-04-13 11:49 ` Mike Benson
2007-04-13 12:13 ` Will Briggs
0 siblings, 1 reply; 10+ messages in thread
From: Mike Benson @ 2007-04-13 11:49 UTC (permalink / raw
To: gentoo-laptop
On Fri, 13 Apr 2007, Will Briggs wrote:
> david wrote:
> > Will Briggs wrote:
> >> G'day all,
> >>
> >> I'm having this problem. During startup both sshd and ntpd are not
> >> started with a warning: "scheduled to start when net.eth0 is started"
I get the same behaviour.
> >>
> >> eth0 is my wired network interface, eth1 is my wireless interface.
> >>
> >> I rarely used a wired network, often use the wireless network.
Life for the modern laptop at home :-) Same here.
> >>
> >> This behaviour is fine, to certain extent, because if net.eth0 comes up
> >> I'd be happy to have sshd and ntpd start.
> >>
> >> However, I also want them to start if and when net.eth1 comes up.
I have the same question!
> >>
> >> I have searched for a dependency setting somewhere but can't find. Can
> >> anyone point me in the right direction?
> >>
> >> Cheers,
> >>
> >> W.
> >
> > Did you;
> > # ln -s net.lo /etc/init.d/net.eth1
>
> Yes. (Well, on checking it wasn't /etc/init.d/net.eth1 -> net.lo but
> /etc/init.d/net.eth1 -> /etc/init.d/net.lo. I've changed that but I
> suspect it makes no difference having the path in the symlink)
It makes no difference (assuming you were in /etc/init.d in the first place).
>
> > # rc-update add net.eth1 default
>
> No - but deliberately. I think this may be where I, or the system is
> confused. Because unlike a desktop it's not just a matter of bringing
> up the /etc/init.d/net.* scripts. I don't want DHCP timeouts etc. when
> booting off-line.
Not only that, but there's some automagic code in the rc scripts that will try
to bring the interfaces up without linking it to a soft runlevel. So
actually, you're better off not doing it.
>
> net.eth0 is brought up by netplug
Actually the message is that net.eth0 is invoking netplug to wait for eth0 in
the background. I could never work out why that doesn't work with net.eth1.
>
> net.eth1 is brought up by as I understand it, the ipw3945 module being
> loaded which runs the ipw3945 daemon, which runs wpa_supplicant, which
> runs the init script (maybe those last two steps are vice versa)
>
> So, currently:
> /etc/init.d/net.eth0 status
> * status: inactive
>
> (which is fine, the wire isn't plugged in)
>
> /etc/init.d/net.eth1 status
> * status: started
>
> which is fine, but I want sshd and ntpd to have recognised this
>
> In the end I want the services brought up when either or both of
> net.eth0 or net.eth1 are started (by cables being plugged in or wireless
> networks coming up etc.)
>
> Thanks for the response,
>
> W.
I guess what we both actually want is for these network dependent services to
come up when *any* external network interface is functional. But how?
Regards,
Mike
--
gentoo-laptop@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-laptop] wireless and service dependencies
2007-04-13 11:49 ` Mike Benson
@ 2007-04-13 12:13 ` Will Briggs
0 siblings, 0 replies; 10+ messages in thread
From: Will Briggs @ 2007-04-13 12:13 UTC (permalink / raw
To: gentoo-laptop
Mike Benson wrote:
>
> I guess what we both actually want is for these network dependent services to
> come up when *any* external network interface is functional. But how?
Thanks for the clarification. This is it exactly.
Here's some clue I guess:
grep -R "is scheduled to start" /etc/*
init.d/runscript.sh: ewarn "WARNING: ${SVCNAME} is
scheduled to start when ${startinactive} has started."
init.d/runscript.sh: ewarn "WARNING: ${x} is
scheduled to start when ${SVCNAME} has started."
but all that looks like it is doing is handling the dependencies - where
are they set?
W.
--
gentoo-laptop@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-laptop] wireless and service dependencies
2007-04-12 23:34 Will Briggs
2007-04-13 0:43 ` david
@ 2007-04-13 13:19 ` Fabio A Correa
2007-04-14 0:32 ` Will Briggs
2007-04-14 13:17 ` YoYo Siska
1 sibling, 2 replies; 10+ messages in thread
From: Fabio A Correa @ 2007-04-13 13:19 UTC (permalink / raw
To: gentoo-laptop
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Study /etc/conf.d/net.example and write a postup() function in /etc/conf.d/net ; Postup is my
preferred way of starting sshd and ntpd, because my wireless network is managed by
wpa_supplicant. Then, when I move my laptop from an access point to another, such services must
be restarted. Nothing better than having Gentoo restarting such services for you.
Here goes an example:
postup () {
/etc/init.d/ntpd restart
/etc/init.d/sshd restart
/etc.init.d/cupsd restart
}
For a more complicated example, including dhcp services on a per-AP basis, email me!
Good day.
Will Briggs wrote:
> G'day all,
>
> I'm having this problem. During startup both sshd and ntpd are not
> started with a warning: "scheduled to start when net.eth0 is started"
>
> eth0 is my wired network interface, eth1 is my wireless interface.
>
> I rarely used a wired network, often use the wireless network.
>
> This behaviour is fine, to certain extent, because if net.eth0 comes up
> I'd be happy to have sshd and ntpd start.
>
> However, I also want them to start if and when net.eth1 comes up.
>
> I have searched for a dependency setting somewhere but can't find. Can
> anyone point me in the right direction?
>
> Cheers,
>
> W.
- --
Fabio A. Correa D.
Physics Dept, Universidad Nacional, Bogota, Colombia
facorread@gmail.com
ffaaccdd@yahoo.co.uk facorread@unal.edu.co
My webpage and OpenPGP key at http://facorread.150m.com
facorread@alexandria.cc is not working anymore!!!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGH4NYYOZCB4zf2uQRApknAJ4zcAC+S0ZjbeZX3Ux2LChBK8sV0wCfcjW9
tm6mzQzEWOP2Xwfg6xrT/YY=
=zRDp
-----END PGP SIGNATURE-----
--
gentoo-laptop@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-laptop] wireless and service dependencies
2007-04-13 13:19 ` Fabio A Correa
@ 2007-04-14 0:32 ` Will Briggs
2007-04-14 13:17 ` YoYo Siska
1 sibling, 0 replies; 10+ messages in thread
From: Will Briggs @ 2007-04-14 0:32 UTC (permalink / raw
To: gentoo-laptop
Fabio A Correa wrote:
> Hello,
>
> Study /etc/conf.d/net.example and write a postup() function in /etc/conf.d/net ; Postup is my
> preferred way of starting sshd and ntpd, because my wireless network is managed by
> wpa_supplicant. Then, when I move my laptop from an access point to another, such services must
> be restarted. Nothing better than having Gentoo restarting such services for you.
>
> Here goes an example:
>
> postup () {
> /etc/init.d/ntpd restart
> /etc/init.d/sshd restart
> /etc.init.d/cupsd restart
> }
G'day Fabio,
Thanks for the post. I'll have a play with this ASAP...
I guess the idea here is that you take /etc/init.d/foo out of the init
runlevels and let this postup function handle it - that way you don't
have any "WARNING: foo scheduled start..." messages on boot up.
So this would be a fix, but it doesn't actually attack the problem of
net.* service dependencies handled by runscript.sh, yes?
Only problem I see with this is this:
1) wireless (eth1) comes up - sshd (re)starts and all is well.
2) I ssh into the laptop from another machine
3) the cat-5 wire gets plugged in for some reason and eth0 comes up -
sshd restarts
4) The connection I had in 2) is lost, even though the link isn't.
Or have I got the wrong end of the stick here?
I'll have a play...
Thanks again,
W.
--
gentoo-laptop@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-laptop] wireless and service dependencies
2007-04-13 13:19 ` Fabio A Correa
2007-04-14 0:32 ` Will Briggs
@ 2007-04-14 13:17 ` YoYo Siska
2007-04-15 9:19 ` Will Briggs
1 sibling, 1 reply; 10+ messages in thread
From: YoYo Siska @ 2007-04-14 13:17 UTC (permalink / raw
To: gentoo-laptop
On Fri, Apr 13, 2007 at 08:19:20AM -0500, Fabio A Correa wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> Study /etc/conf.d/net.example and write a postup() function in /etc/conf.d/net ; Postup is my
> preferred way of starting sshd and ntpd, because my wireless network is managed by
> wpa_supplicant. Then, when I move my laptop from an access point to another, such services must
> be restarted. Nothing better than having Gentoo restarting such services for you.
>
> Here goes an example:
>
> postup () {
> /etc/init.d/ntpd restart
> /etc/init.d/sshd restart
> /etc.init.d/cupsd restart
> }
>
...
> >
> > This behaviour is fine, to certain extent, because if net.eth0 comes up
> > I'd be happy to have sshd and ntpd start.
Is there a specific reason why you have to restart sshd after you
restart/change network services? I don't know about ntpd and cupsd
because I start them only in some places, but I have sshd running all
the time (with RC_NET_STRICT_CHECKING="lo" in /etc/conf.d/rc) it works
correctly (it listens on 0.0.0.0 so any ip changes don't affect it).
I suppose cupsd and ntpd should be the same (well maybe they would have
to be configured to listen on 0.0.0.0, if they are listening on the ip
from an interface by default...)
yoyo
--
_
| icq: 177861806 jabber: yoyo@jabber.cz
YoYo () Siska web: http://people.ksp.sk/~yoyo/
--
gentoo-laptop@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-laptop] wireless and service dependencies
2007-04-14 13:17 ` YoYo Siska
@ 2007-04-15 9:19 ` Will Briggs
0 siblings, 0 replies; 10+ messages in thread
From: Will Briggs @ 2007-04-15 9:19 UTC (permalink / raw
To: gentoo-laptop
YoYo Siska wrote:
>
> Is there a specific reason why you have to restart sshd after you
> restart/change network services? I don't know about ntpd and cupsd
> because I start them only in some places, but I have sshd running all
> the time (with RC_NET_STRICT_CHECKING="lo" in /etc/conf.d/rc) it works
> correctly (it listens on 0.0.0.0 so any ip changes don't affect it).
> I suppose cupsd and ntpd should be the same (well maybe they would have
> to be configured to listen on 0.0.0.0, if they are listening on the ip
> from an interface by default...)
>
Aaaah - that's where it is. Thanks, this gives me the answer I need.
I'll still play with Fabio's tips though - but I think they are for a
more specific need.
W.
--
gentoo-laptop@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-04-15 9:21 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-14 2:13 [gentoo-laptop] wireless and service dependencies Master Control Program
-- strict thread matches above, loose matches on Subject: below --
2007-04-12 23:34 Will Briggs
2007-04-13 0:43 ` david
2007-04-13 1:07 ` Will Briggs
2007-04-13 11:49 ` Mike Benson
2007-04-13 12:13 ` Will Briggs
2007-04-13 13:19 ` Fabio A Correa
2007-04-14 0:32 ` Will Briggs
2007-04-14 13:17 ` YoYo Siska
2007-04-15 9:19 ` Will Briggs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox