Subject: bin/10220: /etc/rc.d/amd has problems when ran from the command line
To: None <firstname.lastname@example.org>
From: None <email@example.com>
Date: 05/28/2000 21:45:13
>Synopsis: /etc/rc.d/amd has problems when ran from the command line
>Arrival-Date: Sun May 28 21:46:00 PDT 2000
>Originator: Ron Roskens
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
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.
login as root and run /etc/rc.d/amd after creating an /etc/amd/master file.
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.