summaryrefslogtreecommitdiffstats
path: root/core/includes/chroot.inc
diff options
context:
space:
mode:
authorSimon Rettberg2017-11-29 22:44:49 +0100
committerYour Name2017-11-29 22:44:49 +0100
commit28216dec68a9f9c467116b07379a2220c3ee3ded (patch)
tree4042975d6602d039df21519cbc52cd928373c12e /core/includes/chroot.inc
parent[vmplayer] Restore accidentally reverted vmplayer startup script for 14.x (diff)
downloadmltk-28216dec68a9f9c467116b07379a2220c3ee3ded.tar.gz
mltk-28216dec68a9f9c467116b07379a2220c3ee3ded.tar.xz
mltk-28216dec68a9f9c467116b07379a2220c3ee3ded.zip
[chroot.inc] Fix generating whiteout list on newer kernels
overlayfs switched from using symlinks to '(overlay-whiteout)' to creating character devices with all permission bits zero. Fix the find expression that gathers all the whiteouts.
Diffstat (limited to 'core/includes/chroot.inc')
-rw-r--r--core/includes/chroot.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/includes/chroot.inc b/core/includes/chroot.inc
index f3bc90c8..3004478c 100644
--- a/core/includes/chroot.inc
+++ b/core/includes/chroot.inc
@@ -162,10 +162,11 @@ chroot_gen_autoexec() {
chroot_handle_whiteouts() {
local WHITEOUT_LIST="${CHROOT_UPPERDIR}/overlay.whiteout.list"
- rm -f -- "$WHITEOUT_LIST="
- #mkdir -p "$(dirname "$WHITEOUT_LIST")" || perror "Could not create $(dirname "$WHITEOUT_LIST")"
+ rm -f -- "$WHITEOUT_LIST"
+ mkdir -p "$(dirname "$WHITEOUT_LIST")" || perror "Could not create $(dirname "$WHITEOUT_LIST")"
+ touch "$WHITEOUT_LIST"
pdebug "Searching for overlayfs-whiteouts ..."
- for WHITEOUT in $(find "$CHROOT_UPPERDIR" -lname "(overlay-whiteout)"); do
+ for WHITEOUT in $(find "$CHROOT_UPPERDIR" \( -type c -perm 0000 \) -o -lname "(overlay-whiteout)"); do
pdebug "Whiteout found: $WHITEOUT"
echo "/./${WHITEOUT#$CHROOT_UPPERDIR}" >> "$WHITEOUT_LIST"
rm -f -- "$WHITEOUT" || perror "Could not delete whiteout $WHITEOUT!"