diff options
| author | Rob Landley <[email protected]> | 2017-07-06 15:35:43 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2017-07-06 16:24:29 -0700 |
| commit | 595a22acee264b5b710897993f3736f57d89bc41 (patch) | |
| tree | 9938c7cd24c6e1d1ef23b1732ffc8e2701b77246 /scripts | |
| parent | 3922920026c0242d752e62a3c88b758715c5c42f (diff) | |
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/[email protected]
Signed-off-by: Rob Landley <[email protected]>
Cc: Michal Marek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/gen_initramfs_list.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh index 0055b07b03b6..cb470fdee733 100755 --- a/scripts/gen_initramfs_list.sh +++ b/scripts/gen_initramfs_list.sh @@ -271,10 +271,12 @@ while [ $# -gt 0 ]; do case "$arg" in "-u") # map $1 to uid=0 (root) root_uid="$1" + [ "$root_uid" = "-1" ] && root_uid=$(id -u || echo 0) shift ;; "-g") # map $1 to gid=0 (root) root_gid="$1" + [ "$root_gid" = "-1" ] && root_gid=$(id -g || echo 0) shift ;; "-d") # display default initramfs list |