From nobody@FreeBSD.org  Tue Oct 28 00:35:24 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B0E481065674
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 28 Oct 2008 00:35:24 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 6FBCA8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 28 Oct 2008 00:35:24 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id m9S0ZNuO059119
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 28 Oct 2008 00:35:23 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id m9S0ZNia059118;
	Tue, 28 Oct 2008 00:35:23 GMT
	(envelope-from nobody)
Message-Id: <200810280035.m9S0ZNia059118@www.freebsd.org>
Date: Tue, 28 Oct 2008 00:35:23 GMT
From: Bruce Cran <bruce@cran.org.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] ensure defaultroute finishes by printing a newline
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         128424
>Category:       conf
>Synopsis:       [patch] ensure defaultroute finishes by printing a newline
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brooks
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 28 00:40:02 UTC 2008
>Closed-Date:    Wed Dec 17 17:36:42 UTC 2008
>Last-Modified:  Wed Dec 17 17:36:42 UTC 2008
>Originator:     Bruce Cran
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD mac.draftnet 8.0-CURRENT FreeBSD 8.0-CURRENT #2: Sun Oct 12 22:47:32 BST 2008 brucec@mac.draftnet:/usr/obj/usr/src/sys/IBOOK powerpc
>Description:
/etc/rc.d/defaultroute fails to finish by printing a newline when it fails to obtain an address via DHCP.  This makes the next rc script begin its output on the same line.
>How-To-Repeat:
Configure a network interface to use DHCP but unplug the network cable.
>Fix:
Apply the attached patch.

Patch attached with submission follows:

--- /usr/src/etc/rc.d/defaultroute	2008-06-05 18:26:47.000000000 +0100
+++ /etc/rc.d/defaultroute	2008-10-27 22:00:12.000000000 +0000
@@ -30,7 +30,7 @@
 		defif=`get_default_if -inet`
 		if [ -n "${defif}" ]; then
 			if [ ${delay} -ne ${if_up_delay} ]; then
-				echo "($defif)"
+				echo -n "($defif)"
 			fi
 			break
 		fi
@@ -42,6 +42,8 @@
 		sleep 1
 		delay=`expr $delay - 1`
 	done
+
+	echo 
 }
 
 load_rc_config $name


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->brooks 
Responsible-Changed-By: brooks 
Responsible-Changed-When: Tue Oct 28 00:41:17 UTC 2008 
Responsible-Changed-Why:  
This is my bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128424 
State-Changed-From-To: open->patched 
State-Changed-By: brooks 
State-Changed-When: Wed Dec 17 17:35:23 UTC 2008 
State-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=128424 
State-Changed-From-To: patched->closed 
State-Changed-By: brooks 
State-Changed-When: Wed Dec 17 17:36:24 UTC 2008 
State-Changed-Why:  
Fixed in HEAD, not in stable. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128424 
>Unformatted:
