From 59e348fc3c5dd086331d884a6dd76fb43a92b7eb Mon Sep 17 00:00:00 2001 From: WorMzy Tykashi Date: Mon, 16 Sep 2013 00:35:37 +0100 Subject: Add mountpoint check to btrfs subvol logic Signed-off-by: Pierre Schmitz --- makechrootpkg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makechrootpkg.in b/makechrootpkg.in index 00e538a..2309be2 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -142,7 +142,7 @@ create_chroot() { slock 8 "$chrootdir/root.lock" "Locking clean chroot" stat_busy "Creating clean working copy [$copy]" - if [[ "$chroottype" == btrfs ]]; then + if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then if [[ -d $copydir ]]; then btrfs subvolume delete "$copydir" >/dev/null || die "Unable to delete subvolume %s" "$copydir" -- cgit v1.2.3-70-g09d2