Bug 22548

Summary: [PATCH] fix broken rc.shutdown $oldscripts check
Product: Base System Reporter: Peter Pentchev <roam>
Component: confAssignee: Sheldon Hearn <sheldonh>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Peter Pentchev 2000-11-02 19:10:01 UTC
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.
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-11-02 19:13:52 UTC
Responsible Changed
From-To: freebsd-bugs->sheldonh

You're dead right; quoting variables was part of the new style  
introduced by Doug Barton ages ago. 

I'll fix it.
Comment 2 Sheldon Hearn freebsd_committer freebsd_triage 2000-11-02 19:25:18 UTC
State Changed
From-To: open->closed

Fixed in rev 1.4.2.4, since this would have been a real bitch 
for 4.2-RELEASE.  Thanks.
Comment 3 Sheldon Hearn 2000-11-02 19:29:33 UTC
On 02 Nov 2000 19:03:29 GMT, Peter Pentchev wrote:

> RELENG_4, -current too.

By the way, I'm pretty sure this is _not_ a problem in -CURRENT.
Double-check? :-)

Ciao,
Sheldon.
Comment 4 Peter Pentchev 2000-11-02 19:37:22 UTC
On Thu, Nov 02, 2000 at 09:29:33PM +0200, Sheldon Hearn wrote:
> 
> 
> On 02 Nov 2000 19:03:29 GMT, Peter Pentchev wrote:
> 
> > RELENG_4, -current too.
> 
> By the way, I'm pretty sure this is _not_ a problem in -CURRENT.
> Double-check? :-)

Errrrrrr...  *Oof*. (that makes TWO of those for today; at least
this PR did have *some* sense in it, unlike bin/22545).

Of course you're right.  Serves me right for trying to think ;)

G'luck,
Peter

-- 
No language can express every thought unambiguously, least of all this one.