[arch-projects] [DEVTOOLS][PATCH 3/3] makechrootpkg: Stat chrootdir type after existancy
Sébastien Luttringer
seblu at seblu.net
Wed Mar 13 22:55:41 EDT 2013
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 at seblu.net>
---
makechrootpkg.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 22e2097..a00745c 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -81,9 +81,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
@@ -119,6 +116,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"
--
Sébastien "Seblu" Luttringer
More information about the arch-projects
mailing list