summaryrefslogtreecommitdiff
path: root/mkarchroot.in
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-04-06 19:50:17 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-04-06 19:50:17 +0200
commit6caad191c1e0dfab3cbb7aa3e832a45eeaea83f8 (patch)
tree560eec5bf839175248b76a4ca06ffb594972afcc /mkarchroot.in
parent092fe2ffde2075705b0a9c686246b3081aea963c (diff)
Only try to use btrfs snapshots if chroots are on a btrfs partition
Diffstat (limited to 'mkarchroot.in')
-rw-r--r--mkarchroot.in6
1 files changed, 4 insertions, 2 deletions
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