From 6caad191c1e0dfab3cbb7aa3e832a45eeaea83f8 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 6 Apr 2013 19:50:17 +0200 Subject: Only try to use btrfs snapshots if chroots are on a btrfs partition --- mkarchroot.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mkarchroot.in') diff --git a/mkarchroot.in b/mkarchroot.in index 9059cdb..ff9d7eb 100644 --- a/mkarchroot.in +++ b/mkarchroot.in @@ -160,8 +160,10 @@ else mkdir -p "${working_dir}" fi - if { type -P btrfs && btrfs subvolume create "${working_dir}"; } &>/dev/null; then - chmod 0755 "${working_dir}" + if [[ "$(stat -f -c %T "${working_dir}")" == btrfs ]]; then + if { type -P btrfs && btrfs subvolume create "${working_dir}"; } &>/dev/null; then + chmod 0755 "${working_dir}" + fi fi chroot_lock -- cgit v1.2.3-24-g4f1b