conf/128424: [patch] ensure defaultroute finishes by printing a newline

Bruce Cran bruce at cran.org.uk
Tue Oct 28 00:40:03 UTC 2008


>Number:         128424
>Category:       conf
>Synopsis:       [patch] ensure defaultroute finishes by printing a newline
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 28 00:40:02 UTC 2008
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-bugs mailing list