[arch-projects] [devtools][PATCH] Add mountpoint check to btrfs subvol logic

WorMzy Tykashi wormzy.tykashi at gmail.com
Sun Sep 15 19:35:37 EDT 2013


---
 makechrootpkg.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/makechrootpkg.in b/makechrootpkg.in
index 8c64ae1..167ee2f 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -140,7 +140,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"
-- 
1.8.4



More information about the arch-projects mailing list