aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorJacob Kroon <jacob.kroon@gmail.com>2013-10-27 10:20:29 +0100
committerAndreas Oberritter <obi@opendreambox.org>2015-02-23 16:51:52 +0100
commit54dbcdd477bec2524625a6a31c0249485c51c91a (patch)
treef5a3ff3e262ff5d3c41ae7e923590cdcd49ba5b7 /meta/classes
parent9cecbb308cc827685671ada7c8a9c76a6a1ae26f (diff)
downloadopenembedded-core-contrib-54dbcdd477bec2524625a6a31c0249485c51c91a.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. Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7e23557835f756b22b95fa7a1926b5d1d21872c3) Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/update-rc.d.bbclass2
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() {
# test if there is a previous init script there, ie, we are updating the package
# if so, we stop the service and remove it before we install from the new package
if type update-rc.d >/dev/null 2>/dev/null; then
- if [ -z "$D" -a `test -f "${INIT_D_DIR}/${INITSCRIPT_NAME}"` ]; then
+ if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
${INIT_D_DIR}/${INITSCRIPT_NAME} stop
fi
if [ -n "$D" ]; then