diff options
author | Jonathan Bauer | 2020-02-11 16:07:22 +0100 |
---|---|---|
committer | Jonathan Bauer | 2020-02-11 16:07:22 +0100 |
commit | 06fe647ff578cf281e56302ddb60f0bde98577e8 (patch) | |
tree | b2a0a61686ff96b94bf1b33026f58ae9f81e1a5e /core/includes | |
parent | [kexec-reboot] also download bwlp.cpio if available (diff) | |
download | mltk-06fe647ff578cf281e56302ddb60f0bde98577e8.tar.gz mltk-06fe647ff578cf281e56302ddb60f0bde98577e8.tar.xz mltk-06fe647ff578cf281e56302ddb60f0bde98577e8.zip |
chroot.inc: do not create empty overlay lists
Diffstat (limited to 'core/includes')
-rw-r--r-- | core/includes/chroot.inc | 3 |
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'" } ############################################################################### |