NetworkManager r3732 - trunk/initscript/RedHat
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3732 - trunk/initscript/RedHat
- Date: Sun, 8 Jun 2008 23:56:34 +0000 (UTC)
Author: dcbw
Date: Sun Jun 8 23:56:34 2008
New Revision: 3732
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3732&view=rev
Log:
Allow blocking startup until there's a connection
Modified:
trunk/initscript/RedHat/NetworkManager.in
Modified: trunk/initscript/RedHat/NetworkManager.in
==============================================================================
--- trunk/initscript/RedHat/NetworkManager.in (original)
+++ trunk/initscript/RedHat/NetworkManager.in Sun Jun 8 23:56:34 2008
@@ -31,6 +31,9 @@
# Source function library.
. /etc/rc.d/init.d/functions
+# Source network configuration
+. /etc/sysconfig/network
+
# so we can rearrange this easily
processname=NetworkManager
servicename=NetworkManager
@@ -49,6 +52,14 @@
daemon --check $servicename $processname --pid-file=$pidfile
RETVAL=$?
echo
+ if [ -n "${NETWORKWAIT}" ]; then
+ [ -z "${LINKDELAY}" ] && LINKDELAY=10
+ echo -n $"Waiting for network..."
+ nm-online -q --timeout=$LINKDELAY || nm-online -q -x --timeout=30
+ [ "$?" = "0" ] && success "network startup" || failure "network startup"
+ echo
+ [ -n "${NETWORKDELAY}" ] && /bin/sleep ${NETWORKDELAY}
+ fi
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]