aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:26 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:26 +0000
commit9e60a331bc8796c3ba5d41be7400bdc066dc73f1 (patch)
treead1cca94954d4f473baa3bc0558797408662f469 /include
parent89a37524b290a551446720a9f79b938ba9f93230 (diff)
downloadupstream-9e60a331bc8796c3ba5d41be7400bdc066dc73f1.tar.gz
upstream-9e60a331bc8796c3ba5d41be7400bdc066dc73f1.tar.bz2
upstream-9e60a331bc8796c3ba5d41be7400bdc066dc73f1.zip
Use current UID for initramfs root user:group
Set the CONFIG_INITRAMFS_ROOT_{U,G}ID kernel variables to the current user, so that all files end up being owned by root in the final initramfs image. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9409 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/kernel-defaults.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 9779921330..cab8352994 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -79,8 +79,8 @@ ifeq ($(KERNEL),2.6)
mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
echo 'CONFIG_INITRAMFS_SOURCE="$(TARGET_DIR)"' >> $(LINUX_DIR)/.config
- echo 'CONFIG_INITRAMFS_ROOT_UID=0' >> $(LINUX_DIR)/.config
- echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config
+ echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config
+ echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config
endef
else
define Kernel/SetInitramfs