From 6f1c4c6a40973d73238e1f221a65c303db05ef9f Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 12 Oct 2023 08:44:48 +0200 Subject: [PATCH] use _root_check --- usr/bin/archboot-cpio.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/usr/bin/archboot-cpio.sh b/usr/bin/archboot-cpio.sh index d1362a80b..531675e7a 100755 --- a/usr/bin/archboot-cpio.sh +++ b/usr/bin/archboot-cpio.sh @@ -129,13 +129,9 @@ preload_builtin_modules() { if [[ -z "$1" ]]; then usage - cleanup 0 -fi -### check for root -if ! [[ ${UID} -eq 0 ]]; then - echo "ERROR: Please run as root user!" - exit 1 + exit 0 fi +_root_check _opt_short='c:d:g:hk:' parseopts "$_opt_short" -- "$@" || exit 1