Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Adding net.br0 to boot runlevel, any concerns?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
sparks
Guru
Guru


Joined: 05 Mar 2003
Posts: 331
Location: Nashville, TN

PostPosted: Wed Sep 20, 2006 7:42 pm    Post subject: Adding net.br0 to boot runlevel, any concerns? Reply with quote

I've been having problems getting br0 to start before ntp-client in the default runlevel. I have tried editing init scripts, moving things around using before and after but every time ntp-client starts before br0 is up all the way. Ntp-client seems to always come up after eth0 and tap0 but before br0. My solution has been to add net.br0 to the boot runlevel. So far so good, no warnings or errors and ntp-client is able to sync with time servers. My question is, are there any hidden "got-yas" that I may run into by putting net.br0 into the boot runlevel?
_________________
True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Wed Sep 20, 2006 8:12 pm    Post subject: Reply with quote

/etc/conf.d/ntp-client:
RC_NEED="net.br0"


adding that line should do it :D
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
sparks
Guru
Guru


Joined: 05 Mar 2003
Posts: 331
Location: Nashville, TN

PostPosted: Thu Sep 21, 2006 12:39 pm    Post subject: Reply with quote

I removed net.br0 from the boot runlevel and added the line you suggested, but ntp-client still tried to load before br0. My init script is below. Any suggestions?

Code:

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.rc,v 1.8 2005/05/14 19:12:04 vapier Exp $

RC_NEED="net.br0"

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

checkconfig() {
   if [ ! -x "`which ${NTPCLIENT_CMD} 2>/dev/null`" ] ; then
      eerror "Please edit /etc/conf.d/ntp-client"
      eerror "Unable to locate the client command ${NTPCLIENT_CMD}!"
      return 1
   fi
   if [ -z "${NTPCLIENT_OPTS}" ] ; then
      eerror "Please edit /etc/conf.d/ntp-client"
      eerror "I need to know what server/options to use!"
      return 1
   fi
   return 0
}

start() {
   checkconfig || return $?

   ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'"
   ${NTPCLIENT_CMD} ${NTPCLIENT_OPTS} >/dev/null &
   local pid=$!
   (sleep ${NTPCLIENT_TIMEOUT:-30}; kill -9 ${pid} >&/dev/null) &
   wait ${pid}
   eend $? "Failed to set clock"
}

_________________
True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Sep 21, 2006 2:19 pm    Post subject: Reply with quote

Add RC_NEED="net.br0" to /etc/conf.d/ntp-client, not init.d
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
sparks
Guru
Guru


Joined: 05 Mar 2003
Posts: 331
Location: Nashville, TN

PostPosted: Thu Sep 21, 2006 4:07 pm    Post subject: Reply with quote

:oops: Thank you UberLord, I misread that :oops:
_________________
True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum