Skip site navigation (1)Skip section navigation (2)
Date:      2 Nov 2000 19:03:29 -0000
From:      Peter Pentchev <roam@orbitel.bg>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   conf/22548: [PATCH] fix broken rc.shutdown $oldscripts check
Message-ID:  <20001102190329.434.qmail@ringworld.oblivion.bg>

next in thread | raw e-mail | index | archive | help

>Number:         22548
>Category:       conf
>Synopsis:       [PATCH] fix broken rc.shutdown $oldscripts check
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 02 11:10:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Peter Pentchev
>Release:        FreeBSD 4.2-BETA i386
>Organization:
Orbitel JSCo.
>Environment:

RELENG_4, -current too.

>Description:

The recently added $oldscripts check in /etc/rc.shutdown is just a bit
off the mark - the very last test fails if there is more than one
old-style script, or none at all.

All the other tests have the shell variable arguments quoted, just
the last one is missing the quotes; /bin/[ then thinks it is being
invoked with more than two arguments, tries to interpret the second
argument as an operator, and fails, because it is actually the name
of the first old-style script.

>How-To-Repeat:

shutdown now on a box with more than one old-style script.

>Fix:

--- src/etc/rc.shutdown	Mon Oct 30 15:56:29 2000
+++ mysrc/etc/rc.shutdown	Thu Nov  2 20:54:41 2000
@@ -81,7 +81,7 @@
 			done
 		fi
 	done
-	if [ ! -z ${oldscripts} ]; then
+	if [ ! -z "${oldscripts}" ]; then
 		echo 'You still seem to have old-style rc.d scripts:'
 		echo ${oldscripts}
 		echo 'Please change them to recognize the "stop" option.'

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001102190329.434.qmail>