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:16:24 +0100 |
commit | c0910f26ea0d692c6d22f2e3f87cf710b31fdf0a (patch) | |
tree | 02dbe932bed7f252c802574b14d80f7b5cc05b65 /meta/classes | |
parent | c47b7734614b28c740ad0eecf409f1e4c0288224 (diff) | |
download | poky-c0910f26ea0d692c6d22f2e3f87cf710b31fdf0a.tar.gz |
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
(From OE-Core rev: 45e22312c48b23480bd6dff98702b0691a48f7d1)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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 | |||
27 | OPTS="--root=$D" | 27 | OPTS="--root=$D" |
28 | fi | 28 | fi |
29 | 29 | ||
30 | if type systemctl >/dev/null; then | 30 | if type systemctl >/dev/null 2>/dev/null; then |
31 | systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE} | 31 | systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE} |
32 | 32 | ||
33 | if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then | 33 | if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then |
@@ -37,7 +37,7 @@ fi | |||
37 | } | 37 | } |
38 | 38 | ||
39 | systemd_prerm() { | 39 | systemd_prerm() { |
40 | if type systemctl >/dev/null; then | 40 | if type systemctl >/dev/null 2>/dev/null; then |
41 | if [ -z "$D" ]; then | 41 | if [ -z "$D" ]; then |
42 | systemctl stop ${SYSTEMD_SERVICE} | 42 | systemctl stop ${SYSTEMD_SERVICE} |
43 | fi | 43 | 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 | |||
18 | else | 18 | else |
19 | OPT="-s" | 19 | OPT="-s" |
20 | fi | 20 | fi |
21 | if type update-rc.d >/dev/null; then | 21 | if type update-rc.d >/dev/null 2>/dev/null; then |
22 | update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} | 22 | update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} |
23 | fi | 23 | fi |
24 | } | 24 | } |
@@ -35,7 +35,7 @@ if test "$D" != ""; then | |||
35 | else | 35 | else |
36 | OPT="" | 36 | OPT="" |
37 | fi | 37 | fi |
38 | if type update-rc.d >/dev/null; then | 38 | if type update-rc.d >/dev/null 2>/dev/null; then |
39 | update-rc.d $OPT ${INITSCRIPT_NAME} remove | 39 | update-rc.d $OPT ${INITSCRIPT_NAME} remove |
40 | fi | 40 | fi |
41 | } | 41 | } |