Fix script execution in the local service

The local service should use eval when it executes scripts since it has
the redirection set up in a variable.

This fixes #50.
X-Gentoo-Bug: 545012
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=545012
This commit is contained in:
William Hubbs 2015-04-02 21:21:46 -05:00
parent 3e9bb3b021
commit 731a3affdc

View File

@ -20,7 +20,7 @@ start()
for file in @SYSCONFDIR@/local.d/*.start; do
if [ -x "${file}" ]; then
vebegin "Executing \"${file}\""
"${file}" $redirect
eval "${file}" $redirect
retval=$?
if [ ${retval} -ne 0 ]; then
has_errors=1
@ -59,7 +59,7 @@ stop()
for file in @SYSCONFDIR@/local.d/*.stop; do
if [ -x "${file}" ]; then
vebegin "Executing \"${file}\""
"${file}" $redirect
eval "${file}" $redirect
retval=$?
if [ ${retval} -ne 0 ]; then
has_errors=1