summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunmin Lee <sunm.lee@samsung.com>2016-09-06 18:44:22 +0900
committerSunmin Lee <sunm.lee@samsung.com>2016-09-06 18:44:22 +0900
commit55bd39bbd04019b9872e94bc900c65ad2379324e (patch)
tree9a54c5ec9b37a5485b4015081843dc44482fe5b8
parent63b015d93e66a906f8dc420bac49ac8145b603f7 (diff)
downloadtizen-platform-config-55bd39bbd04019b9872e94bc900c65ad2379324e.tar.gz
tizen-platform-config-55bd39bbd04019b9872e94bc900c65ad2379324e.tar.bz2
tizen-platform-config-55bd39bbd04019b9872e94bc900c65ad2379324e.zip
Set attributes to existing directories
In spec files, this package includes a list of directories which made by this package with some attributes (permission, smack). However, if some directory already existed, the mkdir command is ignored and so the file permission is not changed. To apply the attributes in the list properly, the chmod should be done instead if the directory exists. Change-Id: I6044ba06dbefb639ee781fddab564a5ec23fa3e7 Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
-rw-r--r--packaging/tizen-platform-config.spec6
1 files changed, 5 insertions, 1 deletions
diff --git a/packaging/tizen-platform-config.spec b/packaging/tizen-platform-config.spec
index ef01941..91a3013 100644
--- a/packaging/tizen-platform-config.spec
+++ b/packaging/tizen-platform-config.spec
@@ -132,7 +132,11 @@ while read s1 s2 s3; do
done |
LANG=C sort |
while read dirname mode context transmute; do
- mkdir -p -m "$mode" "$dirname"
+ if [ -e "$dirname" ]; then
+ chmod "$mode" "$dirname"
+ else
+ mkdir -p -m "$mode" "$dirname"
+ fi
if [ "$transmute" = true ]; then
chsmack -a "$context" -t "$dirname"
else