[Pkg-sysvinit-devel] Bug#345267: sysv-rc /etc/init.d/rc incorrectly calls sourced scripts

Mark Hatle mhatle at mvista.com
Fri Dec 30 00:17:22 UTC 2005


Package: sysv-rc
Version: 2.86.ds.1-8

In the /etc/init.d/rc, when sourcing of ".sh" scripts is enabled I found 
that it does not properly set the arguments for scripts if the shell in 
/bin/dash.

To fix this issue, in each of the three sections the code:

$debug $sh "$script" $action

should be replaced by

if [ "$sh" = "." ]; then
   set $action
   $debug $sh "$script"
else
   $debug $sh "$script" $action
fi

This will work in both dash and bash from my testing.




More information about the Pkg-sysvinit-devel mailing list