Re: [gentoo-user] ntp-client starting before net.eth0

2005-09-10 Thread Neil Bothwick
On Fri, 09 Sep 2005 18:13:47 -0400, Dave Nebinger wrote:

 I'm willing to gues that in the OP's case the ifplugd is not setting
 the provide net flag correctly and/or it is setting the flag before a
 cable is actually connected.  In any case it's probably down  dirty
 with the gentoo networking scripts to figure out how to get the timing
 to work right...

Nor should it add provide net, because ifplugd running doesn't mean the
network is up. My solution would be to remove any network dependent
services from any runlevel that uses ifplugd, and start/stop them from the
postup/predown functions in /etc/conf.d/net instead.

If you wanted to get clever, you could create a new runlevel, say
network, then add rc network to postup() and rc default to predown()
instead of handling each service separately.


-- 
Neil Bothwick

Quark! Quark! Beware the quantum duck!


pgpwGTMBFGPvR.pgp
Description: PGP signature


[gentoo-user] ntp-client starting before net.eth0

2005-09-09 Thread Daevid Vincent
What determines the order that things in rc-update (/etc/init.d) start?

I run ifplugd, and I notice that (as the title says), ntp-client is starting
before net.eth0 and therefore can't find the pool.ntp.org site (of course).

/etc/init.d/ntp-client shows

depend()
{
before cron portmap
need net
use dns logger
}

So shouldn't it wait till the network has started and I have an IP address
from ifplugd?

locutus ~ # rc-update show
   acpid | boot   
   alsasound | boot default   
 anacron |  default   
 apache2 |
apmd |
   aumix |  default   
   bluetooth |
bootmisc | boot   
  bootsplash |
 bttrack |
 checkfs | boot   
   checkroot | boot   
   clock | boot   
coldplug |  default   
 consolefont | boot   
 crypto-loop |
   cupsd |
dbus |  default   
 distccd |
  domainname |  default   
  esound |
famd |  default   
gkrellmd |
 gpm |  default   
  hdparm | boot   
hostname | boot   
 hotplug |  default   
 i8k |  default   
 ifplugd |  default   
   inetd |
   ip6tables |
iptables |
irda |
 keymaps | boot   
  kismet |
lisa |  default   
   local |  default nonetwork 
  localmount | boot   
 modules | boot   
   mysql |
net.ath0 |
net.eth0 |
net.eth1 |
net.eth2 |
  net.lo | boot   
net.ppp0 |
   net.wlan0 |
netmount |  default   
nscd |
  ntp-client |  default   
ntpd |
 numlock |
  pcmcia | boot default   
 portmap |
 postfix |  default   
 pwcheck |
 reslisa |
   rgpsp |
   rmnologin | boot   
  rsyncd |
   samba |
   saslauthd |
  serial | boot   
   shorewall |  default   
   spamd |
  splash |
sshd |  default   
  switch |
   syslog-ng |  default   
 urandom | boot   
  vixie-cron |  default   
  vsftpd |
 winbind |
wlan |
 xdm |
  xinetd |  default  


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] ntp-client starting before net.eth0

2005-09-09 Thread Edward Catmur
On Fri, 2005-09-09 at 14:08 -0700, Daevid Vincent wrote:
 What determines the order that things in rc-update (/etc/init.d) start?
 
 I run ifplugd, and I notice that (as the title says), ntp-client is starting
 before net.eth0 and therefore can't find the pool.ntp.org site (of course).

Look at RC_NET_STRICT_CHECKING in /etc/conf.d/rc.

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] ntp-client starting before net.eth0

2005-09-09 Thread Holly Bostick
Daevid Vincent schreef:
 What determines the order that things in rc-update (/etc/init.d) start?
 
 I run ifplugd, and I notice that (as the title says), ntp-client is starting
 before net.eth0 and therefore can't find the pool.ntp.org site (of course).
 
 /etc/init.d/ntp-client shows
 
 depend()
 {
   before cron portmap
   need net
   use dns logger
 }
 
 So shouldn't it wait till the network has started and I have an IP address
 from ifplugd?

Well, isn't the problem here that the network isn't being requested to
start (until ntp tries to make a connection, which of course attempts to
start it, but then it's too late)?

Look here:

 
 locutus ~ # rc-update show
 net.ath0 |
 net.eth0 |
 net.eth1 |
 net.eth2 |
   net.lo | boot   
 net.ppp0 |
net.wlan0 |

net.lo starts at boot, but no other network service is being started at all.

 netmount |  default   
 nscd |
   ntp-client |  default   

and then here's ntp-client, which needs the network that isn't started.

On the other hand, here's my setup:

rc-update show
  net.eth0 |  default
  net.lo | boot

Both net.lo and net.eth0 are being started, so by the time we get to

  ntp-client |  default

it's capable of making a connection to the server.

So I would suggest

rc-update add net.eth0 default

might solve your problem.

Holly
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] ntp-client starting before net.eth0

2005-09-09 Thread Dave Nebinger
So shouldn't it wait till the network has started and I have an IP 
address

from ifplugd?


Well, isn't the problem here that the network isn't being requested to
start (until ntp tries to make a connection, which of course attempts to
start it, but then it's too late)?


[snip]


So I would suggest

rc-update add net.eth0 default


Slightly off...

ifplugd is used to bring a network connection up/down when the network 
device is plugged in or unplugged.  So the OP doesn't want net.eth0 starting 
at boot automatically because the cable might not be plugged in at the time.


Unfortunately that's as much as I know about ifplugd.  I do know that the 
gentoo network scripts will ensure that the provide net flag is defined 
that ntp-client relies upon to do it's thing.


What I don't know is how integrated ifplugd is with the gentoo network 
scripts, if it too ensures the provide net flag is specified.  Nor do I 
know if, upon cable switching from eth0 to eth1 for example, the network 
services that were previously tied to eth0 would be restarted to now use 
eth1...


I'm willing to gues that in the OP's case the ifplugd is not setting the 
provide net flag correctly and/or it is setting the flag before a cable is 
actually connected.  In any case it's probably down  dirty with the gentoo 
networking scripts to figure out how to get the timing to work right...



Dave

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] ntp-client starting before net.eth0

2005-09-09 Thread John Jolet


On Sep 9, 2005, at 5:13 PM, Dave Nebinger wrote:

So shouldn't it wait till the network has started and I have an  
IP address

from ifplugd?



Well, isn't the problem here that the network isn't being  
requested to
start (until ntp tries to make a connection, which of course  
attempts to

start it, but then it's too late)?



[snip]



So I would suggest

rc-update add net.eth0 default



Slightly off...

ifplugd is used to bring a network connection up/down when the  
network device is plugged in or unplugged.  So the OP doesn't want  
net.eth0 starting at boot automatically because the cable might not  
be plugged in at the time.


Unfortunately that's as much as I know about ifplugd.  I do know  
that the gentoo network scripts will ensure that the provide net  
flag is defined that ntp-client relies upon to do it's thing.


What I don't know is how integrated ifplugd is with the gentoo  
network scripts, if it too ensures the provide net flag is  
specified.  Nor do I know if, upon cable switching from eth0 to  
eth1 for example, the network services that were previously tied to  
eth0 would be restarted to now use eth1...


I'm willing to gues that in the OP's case the ifplugd is not  
setting the provide net flag correctly and/or it is setting the  
flag before a cable is actually connected.  In any case it's  
probably down  dirty with the gentoo networking scripts to figure  
out how to get the timing to work right...


ifplugd seems to have the ability to do whatever you want when the  
interface gets link and loses it, couldn't you just add the ntp- 
client call in the actions script (as specified in the /etc/conf.d/ 
ifplugd file?).  I just installed ifplugd today, so am by no means an  
expert...

--
gentoo-user@gentoo.org mailing list