summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2020-02-11 16:07:22 +0100
committerJonathan Bauer2020-02-11 16:07:22 +0100
commit06fe647ff578cf281e56302ddb60f0bde98577e8 (patch)
treeb2a0a61686ff96b94bf1b33026f58ae9f81e1a5e
parent[kexec-reboot] also download bwlp.cpio if available (diff)
downloadmltk-06fe647ff578cf281e56302ddb60f0bde98577e8.tar.gz
mltk-06fe647ff578cf281e56302ddb60f0bde98577e8.tar.xz
mltk-06fe647ff578cf281e56302ddb60f0bde98577e8.zip
chroot.inc: do not create empty overlay lists
-rw-r--r--core/includes/chroot.inc3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/includes/chroot.inc b/core/includes/chroot.inc
index 87167fa2..d5a404c5 100644
--- a/core/includes/chroot.inc
+++ b/core/includes/chroot.inc
@@ -164,14 +164,13 @@ 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")"
- touch "$WHITEOUT_LIST" || perror "Could not touch whiteout list $WHITEOUT_LIST"
pdebug "Searching for overlayfs-whiteouts ..."
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!"
done
- pinfo "Whiteout list dumped to '${CHROOT_UPPERDIR}/overlay.whiteout.list'"
+ [ -s "$WHITEOUT_LIST" ] && pinfo "Whiteout list dumped to '${CHROOT_UPPERDIR}/overlay.whiteout.list'"
}
###############################################################################