From 5567ff7066bebcd19bff2ff52754d829a08e9d2d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 2 May 2011 21:35:41 +0200 Subject: [PATCH] shutils/chroot.sh: only cleanup /tmp files if /xbps hasn't been mounted. --- xbps-src/shutils/chroot.sh.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xbps-src/shutils/chroot.sh.in b/xbps-src/shutils/chroot.sh.in index 303beffd58..3ad1ba352a 100644 --- a/xbps-src/shutils/chroot.sh.in +++ b/xbps-src/shutils/chroot.sh.in @@ -90,9 +90,11 @@ if [ -n "$XBPS_COMPRESS_LEVEL" ]; then fi echo "# End of configuration file." >> $XBPSSRC_CF -msg_normal "Cleaning up /tmp...\n" if [ -d $XBPS_MASTERDIR/tmp ]; then - rm -rf $XBPS_MASTERDIR/tmp/* + if [ ! -f $XBPS_MASTERDIR/.xbps_mount_bind_done ]; then + msg_normal "Cleaning up /tmp...\n" + rm -rf $XBPS_MASTERDIR/tmp/* + fi fi prepare_chroot()