File 0032-Fixed-to-wait-for-dhcp-ipv6-under-systemd-again.patch of Package sysconfig.openSUSE_12.1_Update

From 153013b7cd1ec32199671284f60c05d587bf06ce Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <mt@suse.com>
Date: Tue, 19 Mar 2013 20:28:40 +0100
Subject: [PATCH] Fixed to wait for dhcp/ipv6 under systemd again
References: bnc#808718
Upstream: yes

Fixed regression caused by bnc#785240, bnc#780644 fixes to not
discard the dhcp/ipv6 dupplicate address detection in progress
error codes under systemd completely, but wait until dhcp/ipv6
dad finished or the WAIT_FOR_INTERFACES timeout is reached and
then discard in the status returned to systemd (bnc#808718).
It caused failures of other services trying to bind tentative
IPv6 addresses, e.g. in mixed dhcp4 / static IPv6 setups.
Thanks to Rolf Eike Beer for the report/tests/debug outputs.
---
 scripts/network | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/scripts/network b/scripts/network
index e62a43c..80469b6 100755
--- a/scripts/network
+++ b/scripts/network
@@ -733,13 +733,16 @@ debug "start order       : ${start_list//  / }"
 
 
 status() {
-	local M IFACE
+	local M FIN IFACE
 	# declare -i R=0 F=0
 	declare -i F=0
-	if [ "$1" = "-m" ]; then
-		M=yes
-		shift
-	fi
+	while test $# -gt 0 ; do
+		case $1 in
+		--final) FIN=yes ; shift ;;
+		-m)        M=yes ; shift ;;
+		*)  break ;;
+		esac
+	done
 	for IFACE in $@; do
 		$FAKE /sbin/ifstatus $CONFIG $IFACE -o rc $CHECK $MODE
 		RET=$?
@@ -752,7 +755,9 @@ status() {
 				;;
 			$R_DHCP_BG)
 				if [ -f "$NETWORK_RUNFILE" -a "$M" = yes ] ; then
-					if [ "$SD_RUNNING" != "yes" ] ; then
+					# do not report failure in --final check under
+					# systemd when setup is still in progress ...
+					if [ "$SD_RUNNING" != "yes" -o "$FIN" != "yes" ] ; then
 						: $((F++))
 					fi
 				fi
@@ -916,7 +921,7 @@ case "$ACTION" in
 			test "$D" = __NSC__ && continue
 			IFACE=$D
 			if [ -d /sys/class/net/$IFACE ] ; then
-				status -m $IFACE && continue
+				status --final -m $IFACE && continue
 				printf "    %-9s interface could not be set up until now\n" $IFACE
 			else
 				printf "    %-35s No interface found\n" $D
@@ -1025,7 +1030,7 @@ case "$ACTION" in
 
 			for IFACE in $VIRTUAL_IFACES; do
 				if [ -d /sys/class/net/$IFACE ] ; then
-					status -m $IFACE && continue
+					status --final -m $IFACE && continue
 					printf "    %-9s interface is not ready until now\n" $IFACE
 				fi
 				rc_failed
-- 
1.8.1.4

openSUSE Build Service is sponsored by