Skip to content
Snippets Groups Projects
Commit 35dc7485 authored by Seblu's avatar Seblu Committed by Pierre Schmitz
Browse files

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: default avatarSébastien Luttringer <seblu@seblu.net>
Signed-off-by: default avatarPierre Schmitz <pierre@archlinux.de>
parent 89bda921
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment