aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/gen_initramfs_list.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
index 683eb12babbb..684fb9cdc055 100644
--- a/scripts/gen_initramfs_list.sh
+++ b/scripts/gen_initramfs_list.sh
@@ -19,11 +19,11 @@ $0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ...
19 -o <file> Create gzipped initramfs file named <file> using 19 -o <file> Create gzipped initramfs file named <file> using
20 gen_init_cpio and gzip 20 gen_init_cpio and gzip
21 -u <uid> User ID to map to user ID 0 (root). 21 -u <uid> User ID to map to user ID 0 (root).
22 <uid> is only meaningful if <cpio_source> 22 <uid> is only meaningful if <cpio_source> is a
23 is a directory. 23 directory. "squash" forces all files to uid 0.
24 -g <gid> Group ID to map to group ID 0 (root). 24 -g <gid> Group ID to map to group ID 0 (root).
25 <gid> is only meaningful if <cpio_source> 25 <gid> is only meaningful if <cpio_source> is a
26 is a directory. 26 directory. "squash" forces all files to gid 0.
27 <cpio_source> File list or directory for cpio archive. 27 <cpio_source> File list or directory for cpio archive.
28 If <cpio_source> is a .cpio file it will be used 28 If <cpio_source> is a .cpio file it will be used
29 as direct input to initramfs. 29 as direct input to initramfs.
@@ -113,8 +113,8 @@ parse() {
113 local gid="$4" 113 local gid="$4"
114 local ftype=$(filetype "${location}") 114 local ftype=$(filetype "${location}")
115 # remap uid/gid to 0 if necessary 115 # remap uid/gid to 0 if necessary
116 [ "$uid" -eq "$root_uid" ] && uid=0 116 [ "$root_uid" = "squash" ] && uid=0 || [ "$uid" -eq "$root_uid" ] && uid=0
117 [ "$gid" -eq "$root_gid" ] && gid=0 117 [ "$root_gid" = "squash" ] && gid=0 || [ "$gid" -eq "$root_gid" ] && gid=0
118 local str="${mode} ${uid} ${gid}" 118 local str="${mode} ${uid} ${gid}"
119 119
120 [ "${ftype}" == "invalid" ] && return 0 120 [ "${ftype}" == "invalid" ] && return 0