index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 18:41:58 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 18:41:58 -0500 |
commit | 05a65ee16dce078e87f5dba576d0d087e22c34d7 (patch) | |
tree | 45974ce391f8c66b8ce04ae3012ba78ec4b57a7f | |
parent | 37eec3ff31c4a709fcd8e21dbf4e53624f0fc2f1 (diff) |
-rw-r--r-- | makechrootpkg.in | 12 |
diff --git a/makechrootpkg.in b/makechrootpkg.in index 970d3e9..8e1fd95 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -146,8 +146,6 @@ btrfs_subvolume_delete() { } # Usage: sync_chroot $CHROOTDIR/$CHROOT <$CHROOTCOPY|$copydir> -# Globals: -# - chroottype sync_chroot() { local chrootdir=$1 local copy=$2 @@ -163,6 +161,9 @@ sync_chroot() { return 1 fi + # Detect chrootdir filesystem type + local chroottype=$(stat -f -c %T "$chrootdir") + # Get a read lock on the root chroot to make # sure we don't clone a half-updated chroot slock 8 "$chrootdir/root.lock" \ @@ -190,10 +191,10 @@ sync_chroot() { } # Usage: delete_chroot $copydir -# Globals: -# - chroottype delete_chroot() { local copydir=$1 + # Detect chrootdir filesystem type + local chroottype=$(stat -f -c %T "$copydir") stat_busy "Removing chroot copy [%s]" "$copydir" if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then @@ -448,9 +449,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 |