summaryrefslogtreecommitdiff
path: root/meta-tizen
diff options
context:
space:
mode:
authorPhilippe Coval <philippe.coval@osg.samsung.com>2016-01-20 10:33:25 +0100
committerLeon Anavi <leon.anavi@konsulko.com>2016-01-27 08:27:29 +0000
commit6df998a4e4fc0127a21092bd71c10a03a4764075 (patch)
treed472b09eb89e2c55fea408bd36ae4206dbe55068 /meta-tizen
parent2bed7855439061b3847b0320350319a09deb90f0 (diff)
downloadtizen-distro-6df998a4e4fc0127a21092bd71c10a03a4764075.tar.gz
tizen-distro-6df998a4e4fc0127a21092bd71c10a03a4764075.tar.bz2
tizen-distro-6df998a4e4fc0127a21092bd71c10a03a4764075.zip
meta-tizen: security-server: Prevent running ldconfig or systemctl if...
This should be executed on system and not on build host. Note It might worth to rewrite all recipes that involve systemd and inherit systemd class when possible (check how for user sessions). Without this change, bitbake tries to run ldconfig on host instead and then complains (but not fail !) about permission issue like : /sbin/ldconfig.real: \ Can't create temporary cache file /etc/ld.so.cache~: \ Permission denied Note, "or condition" is prefered because of shell's -e option. Change-Id: Ib519697d4df1b9754e34ba030eb5b4ebf8c3ad92 (From meta-tizen rev: 4488b2e666ba6757db57af09bfd981c93d6446f8) Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Diffstat (limited to 'meta-tizen')
-rw-r--r--meta-tizen/meta-tizen-common-base/recipes-security/security-server/security-server.inc13
1 files changed, 8 insertions, 5 deletions
diff --git a/meta-tizen/meta-tizen-common-base/recipes-security/security-server/security-server.inc b/meta-tizen/meta-tizen-common-base/recipes-security/security-server/security-server.inc
index b3fbc39fb5..90daf21bde 100644
--- a/meta-tizen/meta-tizen-common-base/recipes-security/security-server/security-server.inc
+++ b/meta-tizen/meta-tizen-common-base/recipes-security/security-server/security-server.inc
@@ -157,14 +157,17 @@ do_install() {
pkg_postinst_${PN}() {
#!/bin/sh -e
- ldconfig
- systemctl daemon-reload
- if [ $1 = 1 ]; then
+ [ "" != "$D" ] || ldconfig
+
# installation
+ if [ $1 = 1 ]; then
+ systemctl daemon-reload
systemctl start security-server.service
fi
- if [ $1 = 2 ]; then
+
# update
+ if [ $1 = 2 ]; then
+ systemctl daemon-reload
systemctl restart security-server.service
fi
@@ -195,7 +198,7 @@ pkg_postrm_libsecurity-server-client() {
pkg_postrm_${PN}() {
#!/bin/sh -e
- ldconfig
+ [ "" != "$D" ] || ldconfig
if [ $1 = 0 ]; then
# unistall
systemctl daemon-reload