aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2012-03-24 19:59:23 +0000
committerColin Guthrie <colin@mageia.org>2012-03-24 20:42:31 +0000
commit2a2806445da7332b10af5ebb8d89d516e171ed6b (patch)
treedd4a18f796c3d42f595b7536356de6dbad2d8241
parent02eaa3560cad5e48784964e92ec4a7f34d3d8335 (diff)
downloadinitscripts-2a2806445da7332b10af5ebb8d89d516e171ed6b.tar
initscripts-2a2806445da7332b10af5ebb8d89d516e171ed6b.tar.gz
initscripts-2a2806445da7332b10af5ebb8d89d516e171ed6b.tar.bz2
initscripts-2a2806445da7332b10af5ebb8d89d516e171ed6b.tar.xz
initscripts-2a2806445da7332b10af5ebb8d89d516e171ed6b.zip
Don't write to stderr that's not there (or a socket)
-rwxr-xr-xservice2
1 files changed, 1 insertions, 1 deletions
diff --git a/service b/service
index c48f88b1..325883de 100755
--- a/service
+++ b/service
@@ -146,7 +146,7 @@ if ! is_ignored_file "$service" && [[ -f $servicedir/$service ]]; then
env -i PATH="$PATH" TERM="$TERM" SYSTEMCTL_IGNORE_DEPENDENCIES=${SYSTEMCTL_IGNORE_DEPENDENCIES} SYSTEMCTL_SKIP_REDIRECT=${SYSTEMCTL_SKIP_REDIRECT} $debug "$servicedir/$service" $options
exit $?
elif [[ -f /lib/systemd/system/"$service".service ]] && /bin/mountpoint -q /sys/fs/cgroup/systemd; then
- echo $"Redirecting to /bin/systemctl ${options} ${service}.service" > /dev/stderr
+ [ -c /dev/stderr ] && echo $"Redirecting to /bin/systemctl ${options} ${service}.service" > /dev/stderr
exec /bin/systemctl ${options} ${service}.service
else
echo "Cannot find $service service"