Date: Tue, 28 Oct 2008 00:35:23 GMT From: Bruce Cran <bruce@cran.org.uk> To: freebsd-gnats-submit@FreeBSD.org Subject: conf/128424: [patch] ensure defaultroute finishes by printing a newline Message-ID: <200810280035.m9S0ZNia059118@www.freebsd.org> Resent-Message-ID: <200810280040.m9S0e3NR052745@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810280035.m9S0ZNia059118>