aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts/initscripts-1.0
diff options
context:
space:
mode:
authorKosta Zertsekel <zertsekel@gmail.com>2018-11-04 21:24:46 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-06 12:14:24 +0000
commit185918234a07cb506d7d7464a49ac33972c7d963 (patch)
tree2c4957c114fb8e4dc4edf9f42e6163f540508b62 /meta/recipes-core/initscripts/initscripts-1.0
parent82f9157e84dcaf0ad4292053b09be68c2290d197 (diff)
downloadopenembedded-core-contrib-185918234a07cb506d7d7464a49ac33972c7d963.tar.gz
meta: Use double colon for chown OWNER:GROUP
Rationale - excerp from `info chown` ==================================== OWNER‘:’GROUP If the OWNER is followed by a colon and a GROUP (a group name or numeric group ID), with no spaces between them, the group ownership of the files is changed as well (to GROUP). Some older scripts may still use ‘.’ in place of the ‘:’ separator. POSIX 1003.1-2001 (*note Standards conformance::) does not require support for that, but for backward compatibility GNU ‘chown’ supports ‘.’ so long as no ambiguity results. New scripts should avoid the use of ‘.’ because it is not portable, and because it has undesirable results if the entire OWNER‘.’GROUP happens to identify a user whose name contains ‘.’. Signed-off-by: Kosta Zertsekel <zertsekel@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index 824f8f3a6b..6f965a6870 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -37,7 +37,7 @@ create_file() {
}
EXEC="
${EXEC}
- chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
+ chown ${TUSER}:${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
@@ -60,7 +60,7 @@ create_file() {
mk_dir() {
EXEC="
mkdir -p \"$1\";
- chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
+ chown ${TUSER}:${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build