tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rc.d/rndctl
On Mon, Nov 03, 2008 at 05:17:34PM -0500, Brian A. Seklecki wrote:
Try the following change:
> rndctl_startcmd() {
>
> # Split on semicolons
> IFS=';' eval set -- \$rndctl_flags
oIFS="$IFS"
IFS=';'
set -- $rndctl_flags
IFS="$oIFS"
Since the errors could easily be caused by an incorrect value in IFS
later in the script, and I'm not 100% sure that these is any code
to support the temporary change to IFS when running a 'special builtin'.
Since variable assignments specified before a command are implemented
by applying them in the child process that executes the command, and
commands like 'eval', 'cd' etc have to be executed in the main shell
process historically the attempt to set IFS temporarily in the script
is flawed.
Reading http://www.opengroup.org/onlinepubs/009695399/toc.htm section 2.14:
Variable assignments specified with special built-in utilities remain in
effect after the built-in completes; this shall not be the case with a
regular built-in or other utility.
So I suspect the script is broken and bash is borked.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index