From: Arne Fitzenreiter Date: Thu, 27 Feb 2014 07:22:11 +0000 (+0100) Subject: ntp: wait only if wpa_supplicant is running. X-Git-Tag: v2.15-rc1~90^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3aa7a123136f35392cea2d37c91ffce1f416094;p=people%2Fms%2Fipfire-2.x.git ntp: wait only if wpa_supplicant is running. --- diff --git a/src/initscripts/init.d/ntp b/src/initscripts/init.d/ntp index 885b610b4d..548b4c4d05 100644 --- a/src/initscripts/init.d/ntp +++ b/src/initscripts/init.d/ntp @@ -10,23 +10,25 @@ case "$1" in start) if [ "$ENABLESETONBOOT" == "on" ]; then boot_mesg -n "Setting time on boot..." - if [ ! -e /var/ipfire/red/active ]; then - boot_mesg "" - boot_mesg -n "Wait for online connection" - for (( i=30; i>1; i-- )) do - if [ -e /var/ipfire/red/active ]; then - break; - fi - boot_mesg -n "." - sleep 1 - done - sleep 5 + if [ $(pidof wpa_supplicant) ]; then + if [ ! -e /var/ipfire/red/active ]; then + boot_mesg "" + boot_mesg -n "Wait for wlan" + for (( i=30; i>1; i-- )) do + if [ -e /var/ipfire/red/active ]; then + break; + fi + boot_mesg -n "." + sleep 2 + done + sleep 5 + fi fi if [ -e /var/ipfire/red/active ]; then boot_mesg "" loadproc /usr/local/bin/settime $(cat /var/ipfire/time/settime.conf) else - boot_mesg " not online!" + boot_mesg " ERROR! Not online!" echo_warning fi fi