rc: fix rc script parsing
77e1ccbee3ed6c837929e4e232fd07f95bfc8294 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: 77e1ccbee3ed6c837929e4e232fd07f95bfc8294
This commit is contained in:
parent
2ae79aa362
commit
f1ab799927
@ -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 ;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user