From 03611dc63e3e44d0504f0d05c3129fbc0b2d1510 Mon Sep 17 00:00:00 2001 From: Sébastien Luttringer Date: Wed, 8 Jan 2014 01:15:37 +0100 Subject: 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 --- archbuild.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'archbuild.in') 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})..." -- cgit v1.2.3-70-g09d2