You are not logged in.
Hi,
I have a little problem. My wlan-driver gets loaded before openntpd starts. But it takes some time until the network connection is ready and most of the time, when openntpd is started, it isn't ready yet ready.
This seems to make openntpd sleep. It's still running but it does nothing. Also if the internet connection starts later, openntpd needs to be restarted to start working.
Is there any workaround or patch for the problem?
Offline
Depends on how you connect to the internet. I have net-profiles in daemons before openntpd and I don't start net-profiles in the background, so I am definitely online before openntpd starts. Same with wicd when I used that.
Offline
I connect with my rc.local:
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
/usr/sbin/wpa_supplicant -B -Dwext -iwlan0 -c /etc/wpa_supplicant.conf 2>1 /dev/null &
/sbin/dhcpcd wlan0 2>1 /dev/null &
But it doesn't matter how I start openntpd, if I start it with rc.d oder also in the rc.local the problem exists on both variants.
I think openntpd should check from time to time if there's connection or not.
Offline
You shouldn't drop that stuff in rc.local. Install netcfg and tell it to leave authentication to wpa_supplicant:
[stijn@hermes ~]$ cat /etc/network.d/intel
CONNECTION="wireless"
INTERFACE="intel"
HOSTNAME="hermes"
# AP authentication
SCAN="yes"
SECURITY="wpa-config"
WPA_CONF="/etc/wpa_supplicant.conf"
WPA_OPTS="-Dwext -B"
ESSID="xxxxxxxxxxxxx"
# IP address
IP="dhcp"
DHCP_TIMEOUT=10
That works fine over here.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Hi B,
thanks for the hint to netcfg. I created now a profile but have a little question about it: Is it possible to make netcfg first check if there's a link at eth0 and just if this fails trying to connect via wireless?
I created to profiles: one for ethernet and one for wireless but how can I realise the above things?
Offline
I think netcfg has a way to present you an (ncurses-based I guess) interactive menu at boot so you can choose which connection to activate at boot. I don't know of a way to switch to another when the first one does not work, though. You could script something for that maybe and dump it in rc.local. Frankly I just set my wireless to active and all it needs for the Ethernet interface to bring up is an ifconfig $interface $IP or a dhcpcd -n $interface.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
My "solution" to the problem is using a wpa start script in rc.d:
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
case "$1" in
start)
stat_busy "Starting WLAN"
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
dhcpcd wlan0 -t0
if [ $? -gt 0 ]; then
stat_fail
else
/etc/rc.d/openntpd start
add_daemon wpa
stat_done
fi
;;
stop)
stat_busy "Stopping WLAN"
pkill wpa_supplicant
pkill dhcpcd
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon wpa
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
The script itself is ripped from somewhere, don't remember.
Notice the "/etc/rc.d/openntpd start" line.
It's a simple hack, albeit it's probably not the most elegant... It works
My coding blog (or an attempt at it)
Archer start page (or an attempt at it)
Offline