summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorSébastien Luttringer <seblu@seblu.net>2013-03-14 03:55:41 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-03-17 11:24:04 +0100
commit35dc7485fb1bbbe6c1dc236f35702561516f0836 (patch)
tree690646cd88914177626e06090961a4d0ea069443 /makechrootpkg.in
parent89bda9217d4c0bb547448afd3439963075c35caf (diff)
downloaddevtools32-35dc7485fb1bbbe6c1dc236f35702561516f0836.tar.xz
makechrootpkg: Stat chrootdir type after existancy
Move detection of chrootdir type after have check if the directory exists. This avoid the following messages when -r is not given stat: cannot read file system information for '': No such file or directory Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 1f0bbb2..e7e5f21 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"