Commit f1ab7999 authored by Cy Schubert's avatar Cy Schubert
Browse files

rc: fix rc script parsing

77e1ccbe introduced a bug whereby
rc scripts in etc/rc.d and $local_startup failed to parse output
from called commands because IFS was set to " " instead of the
default " \t\n". This caused parsing of output that contains any
whitespace character, such as tabs and newlines, not matching just a
space to fail.

PR:		249192
MFC after:	3 weeks
X-MFC with:	77e1ccbe
parent 2ae79aa3
......@@ -105,7 +105,7 @@ files=`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.d/* 2>/dev/null
_rc_elem_done=' '
IFS=$'\n'
for _rc_group in ${files}; do
IFS=$' '
unset IFS
for _rc_elem in ${_rc_group}; do
run_rc_script ${_rc_elem} ${_boot} &
_rc_elem_done="${_rc_elem_done}${_rc_elem} "
......@@ -138,7 +138,7 @@ fi
files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} ${_rc_parallel} 2>/dev/null`
IFS=$'\n'
for _rc_group in ${files}; do
IFS=$' '
unset IFS
for _rc_elem in ${_rc_group}; do
case "$_rc_elem_done" in
*" $_rc_elem "*) continue ;;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment