check pacstrap is run as root, print umask

This commit is contained in:
Stefan Agner 2019-01-24 14:17:25 +01:00
parent 2525e86aed
commit f463a85205
1 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,12 @@
newroot=$1; shift
pacman_args=("${@:-base}")
if [[ $EUID -ne 0 ]]; then
die "This script must be run as root"
fi
umask
[[ -d $newroot ]] || die "%s is not a directory" "$newroot"
echo 'Creating install root at %s' "$newroot"