index : archiso32 | |
Archlinux32 iso tools | gitolite user |
summaryrefslogtreecommitdiff |
author | Michael Gilchrist <michaelgilch@gmail.com> | 2021-03-21 14:00:13 +0000 |
---|---|---|
committer | David Runge <dvzrv@archlinux.org> | 2021-03-21 14:00:13 +0000 |
commit | 6bb12552e4c5351bf5c7c839e75d6bb77c0f7cc6 (patch) | |
tree | a617e6af83334f9acfa889dbc13a8e4be7987108 | |
parent | e43017c955ab9e3d6394098e49fe588bd848d3e2 (diff) |
-rw-r--r-- | README.profile.rst | 2 | ||||
-rwxr-xr-x | archiso/mkarchiso | 9 |
diff --git a/README.profile.rst b/README.profile.rst index 7680628..c22e7bb 100644 --- a/README.profile.rst +++ b/README.profile.rst @@ -55,7 +55,7 @@ The image file is constructed from some of the variables in **profiledef.sh**: ` `('-comp' 'xz')` for squashfs). * `file_permissions`: An associative array that lists files and/or directories who need specific ownership or permissions. The array's keys contain the path and the value is a colon separated list of owner UID, owner GID and - access mode. E.g. `file_permissions=(["/etc/shadow"]="0:0:400")`. + access mode. E.g. `file_permissions=(["/etc/shadow"]="0:0:400")`. When directories are listed with a trailing backslash ("/") **all** files and directories contained within the listed directory will have the same owner UID, owner GID, and access mode applied recursively. packages.arch ============= diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 0d7c698..f9c64ac 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -293,8 +293,13 @@ _make_custom_airootfs() { elif [[ ! -e "${airootfs_dir}${filename}" ]]; then _msg_warning "Cannot change permissions of '${airootfs_dir}${filename}'. The file or directory does not exist." else - chown -fh -- "${permissions[0]}:${permissions[1]}" "${airootfs_dir}${filename}" - chmod -f -- "${permissions[2]}" "${airootfs_dir}${filename}" + if [[ "${filename: -1}" == "/" ]]; then + chown -fhR -- "${permissions[0]}:${permissions[1]}" "${airootfs_dir}${filename}" + chmod -fR -- "${permissions[2]}" "${airootfs_dir}${filename}" + else + chown -fh -- "${permissions[0]}:${permissions[1]}" "${airootfs_dir}${filename}" + chmod -f -- "${permissions[2]}" "${airootfs_dir}${filename}" + fi fi done _msg_info "Done!" |