summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2017-03-07 19:55:05 +0100
committerJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2017-03-07 20:37:54 +0100
commitc53a3e80170dc9d45beeeb623edfbf0bd40799a7 (patch)
tree6cbeab8af72dfa40a7c445817fe208583df7e872 /makechrootpkg.in
parent45f87aa9d5b44e4ff2f73be6597d4024bcded8e3 (diff)
downloaddevtools-c53a3e80170dc9d45beeeb623edfbf0bd40799a7.tar.xz
lib/archroot.sh: Add is_btrfs helper
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in7
1 files changed, 2 insertions, 5 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 695b898..9e84996 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -96,7 +96,7 @@ create_chroot() {
slock 8 "$chrootdir/root.lock" "Locking clean chroot"
stat_busy "Creating clean working copy [$copy]"
- if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then
+ if is_btrfs "$chrootdir" && ! mountpoint -q "$copydir"; then
if [[ -d $copydir ]]; then
btrfs subvolume delete "$copydir" >/dev/null ||
die "Unable to delete subvolume %s" "$copydir"
@@ -119,7 +119,7 @@ create_chroot() {
clean_temporary() {
stat_busy "Removing temporary copy [$copy]"
- if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then
+ if is_btrfs "$chrootdir" && ! mountpoint -q "$copydir"; then
btrfs subvolume delete "$copydir" >/dev/null ||
die "Unable to delete subvolume %s" "$copydir"
else
@@ -285,9 +285,6 @@ chrootdir=$(readlink -e "$passeddir")
[[ ! -d $chrootdir ]] && die "No chroot dir defined, or invalid path '%s'" "$passeddir"
[[ ! -d $chrootdir/root ]] && die "Missing chroot dir root directory. Try using: mkarchroot %s/root base-devel" "$chrootdir"
-# Detect chrootdir filesystem type
-chroottype=$(stat -f -c %T "$chrootdir")
-
if [[ ${copy:0:1} = / ]]; then
copydir=$copy
else