summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2005-12-05 07:04:15 +0000
committerdougb <dougb@FreeBSD.org>2005-12-05 07:04:15 +0000
commit17917518870c026ef063d442e30a6751201584d5 (patch)
tree3901918ca5832178c28b803e0db6851389aed20f /etc
parent0ceccd5c737466f9e15b56dc27af86b8334e25e4 (diff)
downloadFreeBSD-src-17917518870c026ef063d442e30a6751201584d5.zip
FreeBSD-src-17917518870c026ef063d442e30a6751201584d5.tar.gz
Change how *.sh scripts are handled. If the script is in /etc/rc.d,
source it into the shell. If not, handle it in a subshell the same way that "real" rc.d-style scripts are handled. This will dramatically ease the "process local scripts in the base rcorder" transition. Add *.bak to the list of files in */rc.d that we ignore.
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.subr4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.subr b/etc/rc.subr
index d3d52b7..cdbdd09 100644
--- a/etc/rc.subr
+++ b/etc/rc.subr
@@ -832,10 +832,10 @@ run_rc_script()
eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd
case "$_file" in
- *.sh) # run in current shell
+ /etc/rc.d/*.sh) # run in current shell
set $_arg; . $_file
;;
- *[~#]|*.OLD|*.orig|*,v) # scratch file; skip
+ *[~#]|*.OLD|*.bak|*.orig|*,v) # scratch file; skip
warn "Ignoring scratch file $_file"
;;
*) # run in subshell
OpenPOWER on IntegriCloud