summaryrefslogtreecommitdiffstats
path: root/main/lxc/bb-rm.patch
blob: b354d48c4767860bdfb2306077ca35da191f1591 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/lxc/lxc-destroy.in b/src/lxc/lxc-destroy.in
index 846266c..f8f4b48 100644
--- a/src/lxc/lxc-destroy.in
+++ b/src/lxc/lxc-destroy.in
@@ -122,9 +122,9 @@ if [ -n "$rootdev" ]; then
 			btrfs subvolume delete "$rootdev"
 		else
 			# In case rootfs is not under $lxc_path/$lxc_name, remove it
-			rm -rf --one-file-system --preserve-root $rootdev
+			find $rootdev -xdev -delete
 		fi
 	fi
 fi
 # recursively remove the container to remove old container configuration
-rm -rf --one-file-system --preserve-root $lxc_path/$lxc_name
+find $lxc_path/$lxc_name -xdev -delete