diff --git a/makechrootpkg.in b/makechrootpkg.in index 1f0bbb259380f293d22370cfc1535a1c2e691955..e7e5f213dd4ff336cc7d7de9163a6b5343fc0c77 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -78,9 +78,6 @@ done # Canonicalize chrootdir, getting rid of trailing / chrootdir=$(readlink -e "$passeddir") -# Detect chrootdir filesystem type -chroottype=$(stat -f -c %T "$chrootdir") - if [[ ${copy:0:1} = / ]]; then copydir=$copy else @@ -117,6 +114,9 @@ fi umask 0022 +# Detect chrootdir filesystem type +chroottype=$(stat -f -c %T "$chrootdir") + # Lock the chroot we want to use. We'll keep this lock until we exit. # Note this is the same FD number as in mkarchroot exec 9>"$copydir.lock"