From owner-freebsd-bugs Thu Nov 2 11:10:10 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A079F37B4D7 for ; Thu, 2 Nov 2000 11:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id LAA99141; Thu, 2 Nov 2000 11:10:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from ringworld.oblivion.bg (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id 9E42B37B479 for ; Thu, 2 Nov 2000 11:03:49 -0800 (PST) Received: (qmail 435 invoked by uid 0); 2 Nov 2000 19:03:29 -0000 Message-Id: <20001102190329.434.qmail@ringworld.oblivion.bg> Date: 2 Nov 2000 19:03:29 -0000 From: Peter Pentchev Reply-To: Peter Pentchev To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: conf/22548: [PATCH] fix broken rc.shutdown $oldscripts check Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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