From a2e8f79df402be237cf5f7b34e22b16b27629760 Mon Sep 17 00:00:00 2001 From: Daniel Williams Date: Apr 16 2008 19:39:54 +0000 Subject: - Honor options from /etc/sysconfig/network for blocking until network is up --- diff --git a/NetworkManager.spec b/NetworkManager.spec index 56e6946..e9eae21 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -16,7 +16,7 @@ Name: NetworkManager Summary: Network connection manager and user applications Epoch: 1 Version: 0.7.0 -Release: 0.9.1.%{snapshot}%{?dist} +Release: 0.9.2.%{snapshot}%{?dist} Group: System Environment/Base License: GPLv2+ URL: http://www.gnome.org/projects/NetworkManager/ @@ -25,6 +25,7 @@ Source1: nm-applet-%{version}.%{applet_snapshot}.tar.gz Source2: nm-system-settings.conf Patch1: NetworkManager-0.6.5-fixup-internal-applet-build.patch Patch2: no-strict-aliasing.patch +Patch3: optionally-wait-for-network.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) PreReq: chkconfig @@ -137,6 +138,7 @@ NetworkManager functionality from applications that use glib. tar -xzf %{SOURCE1} %patch1 -p1 -b .buildfix %patch2 -p1 -b .no-strict-aliasing +%patch3 -p1 -b .wait-for-network %build # Even though we don't require named, we still build with it @@ -285,6 +287,9 @@ fi %changelog +* Wed Apr 16 2008 Dan Williams - 1:0.7.0-0.9.2.svn3566 +- Honor options from /etc/sysconfig/network for blocking until network is up + * Wed Apr 16 2008 Dan Williams - 1:0.7.0-0.9.1.svn3566 - Turn on Add/Edit in the connection editor - Don't flush or change IPv6 addresses or routes diff --git a/optionally-wait-for-network.patch b/optionally-wait-for-network.patch new file mode 100644 index 0000000..3fd2af0 --- /dev/null +++ b/optionally-wait-for-network.patch @@ -0,0 +1,45 @@ +--- NetworkManager-0.7.0/initscript/RedHat/NetworkManager.in 2008-04-05 12:17:55.000000000 -0400 ++++ NetworkManager-0.7.0/initscript/RedHat/NetworkManager.in 2008-04-16 13:10:41.000000000 -0400 +@@ -2,7 +2,7 @@ + # + # NetworkManager: NetworkManager daemon + # +-# chkconfig: - 98 02 ++# chkconfig: - 27 73 + # description: This is a daemon for automatically switching network \ + # connections to the best available connection. + # +@@ -10,7 +10,7 @@ + # pidfile: /var/run/NetworkManager/NetworkManager.pid + # + ### BEGIN INIT INFO +-# Provides: network_manager ++# Provides: network_manager $network + # Required-Start: $local_fs messagebus haldaemon + # Required-Stop: $local_fs messagebus haldaemon + # Default-Start: 3 4 5 +@@ -34,6 +34,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 +@@ -50,6 +53,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 + } +