Commit 595a22ac authored by Rob Landley's avatar Rob Landley Committed by Linus Torvalds

scripts/gen_initramfs_list.sh: teach INITRAMFS_ROOT_UID and INITRAMFS_ROOT_GID...

scripts/gen_initramfs_list.sh: teach INITRAMFS_ROOT_UID and INITRAMFS_ROOT_GID that -1 means "current user".

Teach INITRAMFS_ROOT_UID and INITRAMFS_ROOT_GID that -1 means "current user".

Link: http://lkml.kernel.org/r/2df3a9fb-4378-fa16-679d-99e788926c05@landley.netSigned-off-by: default avatarRob Landley <rob@landley.net>
Cc: Michal Marek <mmarek@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 39229200
...@@ -271,10 +271,12 @@ while [ $# -gt 0 ]; do ...@@ -271,10 +271,12 @@ while [ $# -gt 0 ]; do
case "$arg" in case "$arg" in
"-u") # map $1 to uid=0 (root) "-u") # map $1 to uid=0 (root)
root_uid="$1" root_uid="$1"
[ "$root_uid" = "-1" ] && root_uid=$(id -u || echo 0)
shift shift
;; ;;
"-g") # map $1 to gid=0 (root) "-g") # map $1 to gid=0 (root)
root_gid="$1" root_gid="$1"
[ "$root_gid" = "-1" ] && root_gid=$(id -g || echo 0)
shift shift
;; ;;
"-d") # display default initramfs list "-d") # display default initramfs list
......
...@@ -36,10 +36,8 @@ config INITRAMFS_ROOT_UID ...@@ -36,10 +36,8 @@ config INITRAMFS_ROOT_UID
depends on INITRAMFS_SOURCE!="" depends on INITRAMFS_SOURCE!=""
default "0" default "0"
help help
This setting is only meaningful if the INITRAMFS_SOURCE is If INITRAMFS_SOURCE points to a directory, files owned by this UID
contains a directory. Setting this user ID (UID) to something (-1 = current user) will be owned by root in the resulting image.
other than "0" will cause all files owned by that UID to be
owned by user root in the initial ramdisk image.
If you are not sure, leave it set to "0". If you are not sure, leave it set to "0".
...@@ -48,10 +46,8 @@ config INITRAMFS_ROOT_GID ...@@ -48,10 +46,8 @@ config INITRAMFS_ROOT_GID
depends on INITRAMFS_SOURCE!="" depends on INITRAMFS_SOURCE!=""
default "0" default "0"
help help
This setting is only meaningful if the INITRAMFS_SOURCE is If INITRAMFS_SOURCE points to a directory, files owned by this GID
contains a directory. Setting this group ID (GID) to something (-1 = current group) will be owned by root in the resulting image.
other than "0" will cause all files owned by that GID to be
owned by group root in the initial ramdisk image.
If you are not sure, leave it set to "0". If you are not sure, leave it set to "0".
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment