diff options
author | Jacob Kroon <jacob.kroon@gmail.com> | 2013-10-27 10:20:29 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-29 10:45:21 +0000 |
commit | 76751a03b1475f22499c488395274453096b9c38 (patch) | |
tree | 31459716846e673e2a785850da5a73a184a0ee67 /meta/classes | |
parent | 5e75eba0276d49efe3bf7a0d5ac10a686744fe46 (diff) | |
download | poky-76751a03b1475f22499c488395274453096b9c38.tar.gz |
update-rc.d.bbclass: Fix host/target test in postinst
When running the postinst script I get a shell warning:
sh: argument expected
and the service is never stopped. This patch fixes the warning
message and stops the service.
Patch v2: Hans Beckérus pointed out that the patch is not correct.
This version uses the syntax proposed by Hans. I've tested
that the postinst script works correctly when run on the target,
both when the init script exists and when it doesn't exist.
(From OE-Core rev: 7e23557835f756b22b95fa7a1926b5d1d21872c3)
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/update-rc.d.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass index e14659d118..9437e9cc31 100644 --- a/meta/classes/update-rc.d.bbclass +++ b/meta/classes/update-rc.d.bbclass | |||
@@ -16,7 +16,7 @@ updatercd_postinst() { | |||
16 | # test if there is a previous init script there, ie, we are updating the package | 16 | # test if there is a previous init script there, ie, we are updating the package |
17 | # if so, we stop the service and remove it before we install from the new package | 17 | # if so, we stop the service and remove it before we install from the new package |
18 | if type update-rc.d >/dev/null 2>/dev/null; then | 18 | if type update-rc.d >/dev/null 2>/dev/null; then |
19 | if [ -z "$D" -a `test -f "${INIT_D_DIR}/${INITSCRIPT_NAME}"` ]; then | 19 | if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then |
20 | ${INIT_D_DIR}/${INITSCRIPT_NAME} stop | 20 | ${INIT_D_DIR}/${INITSCRIPT_NAME} stop |
21 | fi | 21 | fi |
22 | if [ -n "$D" ]; then | 22 | if [ -n "$D" ]; then |