aboutsummaryrefslogtreecommitdiff
path: root/fs/common.mk
diff options
context:
space:
mode:
authorGravatar Matt Weber <matthew.weber@rockwellcollins.com>2018-10-02 18:02:20 -0500
committerGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2018-10-20 14:33:24 +0100
commitc3edec0018c22814233838b4e6c11c577993923d (patch)
treeba714f1fa000ddb3da1230c0151372b4c4f6a3f7 /fs/common.mk
parentd6f2fb191828b49814b78605ee193a21750380eb (diff)
downloadbuildroot-c3edec0018c22814233838b4e6c11c577993923d.tar.gz
buildroot-c3edec0018c22814233838b4e6c11c577993923d.tar.bz2
fs/common: allow custom user table to override package-defined users
Currently, when a custom user table and a package define the same user, the settings from the package takes precedence over the ones from the custom user table. However, it makes sense to allow the settings from the custom user table take precedence. For example, it would allow redirecting the user's home directory to an alternate location (e.g. away from tmp and into a partition that is persistent). The support/scripts/mkusers script will only retain settings from the latest definition it finds. Thus, by passing the custom user table after the package defined users, it is possible to override the package provided user definitions. Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'fs/common.mk')
-rw-r--r--fs/common.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/common.mk b/fs/common.mk
index abf35418cb..453da6010a 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -75,10 +75,11 @@ $(ROOTFS_COMMON_TAR): $(ROOTFS_COMMON_DEPENDENCIES) target-finalize
echo '#!/bin/sh' > $(FAKEROOT_SCRIPT)
echo "set -e" >> $(FAKEROOT_SCRIPT)
echo "chown -h -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
+
+ $(call PRINTF,$(PACKAGES_USERS)) >> $(USERS_TABLE)
ifneq ($(ROOTFS_USERS_TABLES),)
cat $(ROOTFS_USERS_TABLES) >> $(USERS_TABLE)
endif
- $(call PRINTF,$(PACKAGES_USERS)) >> $(USERS_TABLE)
PATH=$(BR_PATH) $(TOPDIR)/support/scripts/mkusers $(USERS_TABLE) $(TARGET_DIR) >> $(FAKEROOT_SCRIPT)
ifneq ($(ROOTFS_DEVICE_TABLES),)
cat $(ROOTFS_DEVICE_TABLES) > $(FULL_DEVICE_TABLE)