4e4f54c
diff -up NetworkManager-0.7.0/initscript/RedHat/NetworkManager.in.wait-for-network NetworkManager-0.7.0/initscript/RedHat/NetworkManager.in
4e4f54c
--- NetworkManager-0.7.0/initscript/RedHat/NetworkManager.in.wait-for-network	2008-04-24 11:49:01.000000000 -0400
4e4f54c
+++ NetworkManager-0.7.0/initscript/RedHat/NetworkManager.in	2008-04-27 21:51:07.000000000 -0400
4e4f54c
@@ -2,7 +2,7 @@
4e4f54c
 #
4e4f54c
 # NetworkManager:   NetworkManager daemon
4e4f54c
 #
4e4f54c
-# chkconfig: - 27 73
4e4f54c
+# chkconfig: - 98 02
4e4f54c
 # description:  This is a daemon for automatically switching network \
4e4f54c
 #               connections to the best available connection.
4e4f54c
 #
4e4f54c
@@ -10,7 +10,7 @@
4e4f54c
 # pidfile: /var/run/NetworkManager/NetworkManager.pid
4e4f54c
 #
4e4f54c
 ### BEGIN INIT INFO
4e4f54c
-# Provides: network_manager $network
4e4f54c
+# Provides: network_manager
4e4f54c
 # Required-Start: messagebus haldaemon
4e4f54c
 # Required-Stop: messagebus haldaemon
4e4f54c
 # Default-Start: 2 3 4 5
4e4f54c
@@ -34,6 +34,9 @@ NETWORKMANAGER_BIN=${sbindir}/NetworkMan
cb1826a
 # Source function library.
cb1826a
 . /etc/rc.d/init.d/functions
cb1826a
 
cb1826a
+# Source network configuration
cb1826a
+. /etc/sysconfig/network
cb1826a
+
cb1826a
 # so we can rearrange this easily
cb1826a
 processname=NetworkManager
cb1826a
 servicename=NetworkManager
4e4f54c
@@ -52,6 +55,14 @@ start()
cb1826a
 	daemon --check $servicename $processname --pid-file=$pidfile
cb1826a
 	RETVAL=$?
cb1826a
 	echo
cb1826a
+	if [ -n "${NETWORKWAIT}" ]; then 
cb1826a
+		[ -z "${LINKDELAY}" ] && LINKDELAY=10
cb1826a
+		echo -n $"Waiting for network..."
cb1826a
+		nm-online -q --timeout=$LINKDELAY || nm-online -q -x --timeout=30
cb1826a
+		[ "$?" = "0" ] && success "network startup" || failure "network startup"
cb1826a
+		echo
cb1826a
+		[ -n "${NETWORKDELAY}" ] && /bin/sleep ${NETWORKDELAY}
cb1826a
+	fi
cb1826a
 	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename
cb1826a
 }
cb1826a