diff options
author | Sébastien Luttringer <seblu@seblu.net> | 2014-01-08 01:15:37 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-05-10 08:05:08 +0200 |
commit | 03611dc63e3e44d0504f0d05c3129fbc0b2d1510 (patch) | |
tree | 770ca5cea407be8a4c9ad0cd9ec8b5de30e429f4 /archbuild.in | |
parent | 7aac293d76e4bdf6ceee1cfe5d888060c24f1822 (diff) | |
download | devtools32-03611dc63e3e44d0504f0d05c3129fbc0b2d1510.tar.xz |
Switch to root when started as regular user
In collaborative builder machine, these scripts are often allowed to become root
via sudo. This patch avoid to prefix them by sudo each time or call su.
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'archbuild.in')
-rw-r--r-- | archbuild.in | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/archbuild.in b/archbuild.in index b1c96f9..ae2f511 100644 --- a/archbuild.in +++ b/archbuild.in @@ -40,9 +40,7 @@ done # Pass all arguments after -- right to makepkg makechrootpkg_args+=("${@:$OPTIND}") -if (( EUID )); then - die 'This script must be run as root.' -fi +check_root "$0" "$@" if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then msg "Creating chroot for [${repo}] (${arch})..." |