Subject: bin/10220: /etc/rc.d/amd has problems when ran from the command line
To: None <gnats-bugs@gnats.netbsd.org>
From: None <roskens@elfin.net>
List: netbsd-bugs
Date: 05/28/2000 21:45:13
>Number:         10220
>Category:       bin
>Synopsis:       /etc/rc.d/amd has problems when ran from the command line
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 28 21:46:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Ron Roskens
>Release:        20000527
>Organization:
	Internet
>Environment:
	
System: NetBSD dev.elfin.net 1.4Z NetBSD 1.4Z (GENERIC) #12: Sat May 27 16:55:41 PDT 2000 root@swinger:/u1/snapshots/src/sys/arch/i386/compile/GENERIC i386


>Description:
When running /etc/rc.d/amd from the command line, the script gives errors
because some of the arguments defined are not yet defined in the environment.

command_args makes use of $amd_dir and $amd_master, but neither of these
variables are defined in the script until load_rc_config() is ran.

>How-To-Repeat:
login as root and run /etc/rc.d/amd after creating an /etc/amd/master file.
>Fix:
You can either escape the variables, or run load_rc_config() after defining
$name in the script. Since required_files and required_dirs also use $amd_dir
and $amd_master, load_rc_config() should be moved up after $name is defined.
>Release-Note:
>Audit-Trail:
>Unformatted: