diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2015-01-25 16:23:47 -0600 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2015-02-18 09:58:54 -0600 |
commit | 9dfb85d5d236dd126d13d039eb02a97aa0e6c8ac (patch) | |
tree | b42dc15e6faf678b1d5735958f20cfb27b042cc3 /init.d | |
parent | 6781667641580fef852ccffc2f42d060f791b354 (diff) |
local: fix redirections
The local service now redirects stdout and stderr for the scripts it
runs to /dev/null unless it is run in verbose mode.
X-Gentoo-Bug: 537444
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=537444
Diffstat (limited to 'init.d')
-rw-r--r-- | init.d/local.in | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/init.d/local.in b/init.d/local.in index 180735de..63f85986 100644 --- a/init.d/local.in +++ b/init.d/local.in @@ -14,12 +14,13 @@ start() { ebegin "Starting local" - local file has_errors=0 retval + local file has_errors=0 redirect retval + yesno $rc_verbose || redirect='> /dev/null 2>&1' eindent for file in @SYSCONFDIR@/local.d/*.start; do if [ -x "${file}" ]; then vebegin "Executing \"${file}\"" - "${file}" 2>&1 >/dev/null + "${file}" $redirect retval=$? if [ ${retval} -ne 0 ]; then has_errors=1 @@ -52,12 +53,13 @@ stop() { ebegin "Stopping local" - local file has_errors=0 retval + local file has_errors=0 redirect retval + yesno $rc_verbose || redirect='> /dev/null 2>&1' eindent for file in @SYSCONFDIR@/local.d/*.stop; do if [ -x "${file}" ]; then vebegin "Executing \"${file}\"" - "${file}" 2>&1 >/dev/null + "${file}" $redirect retval=$? if [ ${retval} -ne 0 ]; then has_errors=1 |