pacstrap/arch-chroot: require root privileges to run
Suggested by Pierre. This makes sense since somewhere along the line, pacman or mount are going to complain.
This commit is contained in:
parent
b60114252c
commit
542e888b48
@ -16,6 +16,7 @@ if [[ -z $1 || $1 = @(-h|--help) ]]; then
|
||||
exit $(( $# ? 0 : 1 ))
|
||||
fi
|
||||
|
||||
(( EUID == 0 )) || die 'This script must be run with root privileges'
|
||||
|
||||
[[ -d $1 ]] || die "Can't create chroot on non-directory %s" "$1"
|
||||
|
||||
|
@ -30,6 +30,8 @@ if [[ -z $1 || $1 = @(-h|--help) ]]; then
|
||||
exit $(( $# ? 0 : 1 ))
|
||||
fi
|
||||
|
||||
(( EUID == 0 )) || die 'This script must be run with root privileges'
|
||||
|
||||
while getopts ':dr:' flag; do
|
||||
case $flag in
|
||||
d)
|
||||
|
Loading…
Reference in New Issue
Block a user