a2e8f79
--- NetworkManager-0.7.0/initscript/RedHat/NetworkManager.in	2008-04-05 12:17:55.000000000 -0400
a2e8f79
+++ NetworkManager-0.7.0/initscript/RedHat/NetworkManager.in	2008-04-16 13:10:41.000000000 -0400
a2e8f79
@@ -2,7 +2,7 @@
a2e8f79
 #
a2e8f79
 # NetworkManager:   NetworkManager daemon
a2e8f79
 #
a2e8f79
-# chkconfig: - 98 02
a2e8f79
+# chkconfig: - 27 73
a2e8f79
 # description:  This is a daemon for automatically switching network \
a2e8f79
 #               connections to the best available connection.
a2e8f79
 #
a2e8f79
@@ -10,7 +10,7 @@
a2e8f79
 # pidfile: /var/run/NetworkManager/NetworkManager.pid
a2e8f79
 #
a2e8f79
 ### BEGIN INIT INFO
a2e8f79
-# Provides: network_manager
a2e8f79
+# Provides: network_manager $network
a2e8f79
 # Required-Start: $local_fs messagebus haldaemon
a2e8f79
 # Required-Stop: $local_fs messagebus haldaemon
a2e8f79
 # Default-Start:  3 4 5
a2e8f79
@@ -34,6 +34,9 @@
a2e8f79
 # Source function library.
a2e8f79
 . /etc/rc.d/init.d/functions
a2e8f79
 
a2e8f79
+# Source network configuration
a2e8f79
+. /etc/sysconfig/network
a2e8f79
+
a2e8f79
 # so we can rearrange this easily
a2e8f79
 processname=NetworkManager
a2e8f79
 servicename=NetworkManager
a2e8f79
@@ -50,6 +53,14 @@
a2e8f79
 	daemon --check $servicename $processname --pid-file=$pidfile
a2e8f79
 	RETVAL=$?
a2e8f79
 	echo
a2e8f79
+	if [ -n "${NETWORKWAIT}" ]; then 
a2e8f79
+		[ -z "${LINKDELAY}" ] && LINKDELAY=10
a2e8f79
+		echo -n $"Waiting for network..."
a2e8f79
+		nm-online -q --timeout=$LINKDELAY || nm-online -q -x --timeout=30
a2e8f79
+		[ "$?" = "0" ] && success "network startup" || failure "network startup"
a2e8f79
+		echo
a2e8f79
+		[ -n "${NETWORKDELAY}" ] && /bin/sleep ${NETWORKDELAY}
a2e8f79
+	fi
a2e8f79
 	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename
a2e8f79
 }
a2e8f79