From admin@citylink.dinoex.sub.org  Sat Aug 27 22:12:42 2005
Return-Path: <admin@citylink.dinoex.sub.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9E5FA16A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 27 Aug 2005 22:12:42 +0000 (GMT)
	(envelope-from admin@citylink.dinoex.sub.org)
Received: from uucp.dinoex.sub.de (uucp.dinoex.sub.de [194.45.71.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A39EC43D46
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 27 Aug 2005 22:12:40 +0000 (GMT)
	(envelope-from admin@citylink.dinoex.sub.org)
Received: from uucp.dinoex.sub.de (uucp@uucp.dinoex.sub.de [194.45.71.2] (may be forged))
	by uucp.dinoex.sub.de (8.13.4/8.13.3) with ESMTP id j7RMCAX1011667
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Aug 2005 00:12:11 +0200 (CEST)
	(envelope-from admin@citylink.dinoex.sub.org)
Received: from citylink.dinoex.sub.org (uucp@localhost)
	by uucp.dinoex.sub.de (8.13.4/8.13.3/Submit) with UUCP id j7RMCAKx011666
	for FreeBSD-gnats-submit@freebsd.org; Sun, 28 Aug 2005 00:12:10 +0200 (CEST)
	(envelope-from admin@citylink.dinoex.sub.org)
Received: from gate.oper.dinoex.org (gate-e [192.168.98.2])
	by citylink.dinoex.sub.de (8.13.1/8.13.1) with ESMTP id j7RLL0Bd081725
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 27 Aug 2005 23:21:00 +0200 (CEST)
	(envelope-from admin@edge.oper.dinoex.org)
Received: from edge.oper.dinoex.org (gate-e [192.168.98.2])
	by gate.oper.dinoex.org (8.13.1/8.13.1) with ESMTP id j7RLKrQB081674
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 27 Aug 2005 23:20:53 +0200 (CEST)
	(envelope-from admin@edge.oper.dinoex.org)
Received: from edge.oper.dinoex.org (edge-e.oper.dinoex.org [192.168.98.6])
	by edge.oper.dinoex.org (8.13.1/8.13.1) with ESMTP id j7RLIbMA081481
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 27 Aug 2005 23:18:38 +0200 (CEST)
	(envelope-from admin@edge.oper.dinoex.org)
Received: (from admin@localhost)
	by edge.oper.dinoex.org (8.13.1/8.13.1/Submit) id j7RLIbva081480;
	Sat, 27 Aug 2005 23:18:37 +0200 (CEST)
	(envelope-from admin)
Message-Id: <200508272118.j7RLIbva081480@edge.oper.dinoex.org>
Date: Sat, 27 Aug 2005 23:18:37 +0200 (CEST)
From: Peter Much <peter@citylink.dinoex.sub.org>
Reply-To: Peter Much <peter@citylink.dinoex.sub.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: syntaxerror in /etc/rc.d/devfs
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         85363
>Category:       conf
>Synopsis:       syntax error in /etc/rc.d/devfs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-rc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 27 22:20:17 GMT 2005
>Closed-Date:    Sun Jan 27 13:41:57 UTC 2008
>Last-Modified:  Sun Jan 27 13:41:57 UTC 2008
>Originator:     Peter Much
>Release:        FreeBSD 5.3-RELEASE-p20 i386
>Organization:
none
>Environment:
System: FreeBSD edge.oper.dinoex.org 5.3-RELEASE-p20 FreeBSD 5.3-RELEASE-p20 #1: Sun Aug 7 19:29:25 CEST 2005 root@edge.oper.dinoex.org:/usr/src/sys/i386/compile/E1R53V1 i386

>Description:

	devfs_system_ruleset="99"       
in /etc/rc.conf does not work.

>How-To-Repeat:

	not applicable

>Fix:

	in /etc/rc.d/devfs:devfs_start()

                devfs_set_ruleset $devfs_system_ruleset /dev
                devfs_apply_ruleset $devfs_system_ruleset /dev

	the $ signs must be removed. Similar problem a couple of lines lower:

                                devfs_set_ruleset $_set $_dir
                                devfs_apply_ruleset $_set $_dir

	But maybe its better to change the devfs functions in rc.subr.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Mon Dec 5 09:26:06 GMT 2005 
Responsible-Changed-Why:  

Bring this to the attention of the list 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85363 

From: Peter Much <pmc@citylink.dinoex.sub.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/85363: syntax error in /etc/rc.d/devfs
Date: Sat, 24 Dec 2005 23:58:10 +0100

 Now I found time to analyze this thoroughly. 
 
 I found that I have made a mistake. It just does not work to name a
 ruleset by its NUMBER in rc.conf, instead one must always name it by
 its NAME. (And, btw, that name must not begin with a number!)
 
 Now, ideally, if one mentions the number instead of the name in rc.conf,
 the code should behave as if a nonexistent ruleset was mentioned -
 i.e. do nothing or raise an error.
 Practically it does behave undefined, that is, wrong rulesets will 
 silently be applied.
 
 But, overall, this is one of the implicit weaknesses of  shell
 scripting, when strings that are to be freely defined by the installer
 are used as variable names.
 And as the thing is designed as it is, there is no easy solution 
 to make it better.
 
 An improvement will be the usage of {} delimiters. A construct
 like "eval rs=\$$1" will behave less undefined if it is  written as
 "eval rs=\${$1}". There is a couple of places in rc.subr where this
 would be argueable.
 
 PMc
State-Changed-From-To: open->closed 
State-Changed-By: mtm 
State-Changed-When: Sun Jan 27 13:37:10 UTC 2008 
State-Changed-Why:  
As noted by the submitter the rc.d/devfs script does not accept rule numbers, only names. Perhaps Iwe should clarify that in defaults/rc.conf. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85363 
>Unformatted:
