Skip to content
Snippets Groups Projects
Commit 6caad191 authored by Pierre Schmitz's avatar Pierre Schmitz
Browse files

Only try to use btrfs snapshots if chroots are on a btrfs partition

parent 092fe2ff
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,9 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then ...@@ -58,7 +58,9 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
stat_done stat_done
fi fi
{ type -P btrfs && btrfs subvolume delete "${copy}"; } &>/dev/null if [[ "$(stat -f -c %T "${copy}")" == btrfs ]]; then
{ type -P btrfs && btrfs subvolume delete "${copy}"; } &>/dev/null
fi
rm -rf --one-file-system "${copy}" rm -rf --one-file-system "${copy}"
done done
exec 9>&- exec 9>&-
......
...@@ -160,8 +160,10 @@ else ...@@ -160,8 +160,10 @@ else
mkdir -p "${working_dir}" mkdir -p "${working_dir}"
fi fi
if { type -P btrfs && btrfs subvolume create "${working_dir}"; } &>/dev/null; then if [[ "$(stat -f -c %T "${working_dir}")" == btrfs ]]; then
chmod 0755 "${working_dir}" if { type -P btrfs && btrfs subvolume create "${working_dir}"; } &>/dev/null; then
chmod 0755 "${working_dir}"
fi
fi fi
chroot_lock chroot_lock
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment