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>
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