diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2013-03-28 15:28:41 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-02 18:15:49 +0100 |
commit | 45e22312c48b23480bd6dff98702b0691a48f7d1 (patch) | |
tree | 8cef469a674eff21036d59b3460d36e8c8357cba /meta | |
parent | e9e4a90c7e66abe2ab2c335d60ef91e869f48693 (diff) | |
download | openembedded-core-45e22312c48b23480bd6dff98702b0691a48f7d1.tar.gz openembedded-core-45e22312c48b23480bd6dff98702b0691a48f7d1.tar.bz2 openembedded-core-45e22312c48b23480bd6dff98702b0691a48f7d1.zip |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/systemd.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/update-rc.d.bbclass | 4 |
2 files changed, 4 insertions, 4 deletions
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 diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass index 9f1e28a59d..0c2b94a25b 100644 --- a/meta/classes/update-rc.d.bbclass +++ b/meta/classes/update-rc.d.bbclass @@ -18,7 +18,7 @@ if test "x$D" != "x"; then else OPT="-s" fi -if type update-rc.d >/dev/null; then +if type update-rc.d >/dev/null 2>/dev/null; then update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} fi } @@ -35,7 +35,7 @@ if test "$D" != ""; then else OPT="" fi -if type update-rc.d >/dev/null; then +if type update-rc.d >/dev/null 2>/dev/null; then update-rc.d $OPT ${INITSCRIPT_NAME} remove fi } |