From 45e22312c48b23480bd6dff98702b0691a48f7d1 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 28 Mar 2013 15:28:41 +0100 Subject: update-rc.d, systemd: redirect also stderr from type * different shells different behavior? bash prints 'type: update-rc.d: not found' on stderr busybox's sh on stdout Signed-off-by: Richard Purdie --- meta/classes/systemd.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta/classes/systemd.bbclass') diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass index 42fa554c12..69eeb9ef16 100644 --- a/meta/classes/systemd.bbclass +++ b/meta/classes/systemd.bbclass @@ -27,7 +27,7 @@ if [ -n "$D" ]; then OPTS="--root=$D" fi -if type systemctl >/dev/null; then +if type systemctl >/dev/null 2>/dev/null; then systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE} if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then @@ -37,7 +37,7 @@ fi } systemd_prerm() { -if type systemctl >/dev/null; then +if type systemctl >/dev/null 2>/dev/null; then if [ -z "$D" ]; then systemctl stop ${SYSTEMD_SERVICE} fi -- cgit 1.2.3-korg