From c518cd00235211dcc70ff3685c7a0ba87f6f97b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Bar=C4=87?= Date: Fri, 29 Jan 2021 20:05:50 +0100 Subject: [PATCH] src: use su instead of sudo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maciej Barć --- src/clean-md5-cache | 2 +- src/eball | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clean-md5-cache b/src/clean-md5-cache index 4e60b27..daa7239 100755 --- a/src/clean-md5-cache +++ b/src/clean-md5-cache @@ -34,7 +34,7 @@ if [ -d "${cache}" ] then if ! rm -fr "${cache}" then - sudo rm -fr "${cache}" || exit 1 + su root -c "rm -fr ${cache}" || exit 1 fi else echo "No pre-generated md5-cache found in ${cache}" diff --git a/src/eball b/src/eball index 70a6b0f..5007680 100755 --- a/src/eball +++ b/src/eball @@ -56,7 +56,7 @@ do if [ "$(whoami)" != root ] && [ -z "${EPREFIX}" ] then echo "Switching to the root account" - sudo ebuild "${ebuild}" clean test merge + su root -c "ebuild ${ebuild} clean test merge" else ebuild "${ebuild}" clean test merge fi