From 3acc41dc7f9ab6982666c5e045c2ae64af4ad959 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 7 Apr 2022 02:55:00 -0500 Subject: [PATCH] Actually require to run with admin rights. --- tools/aws-grub-setup.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/aws-grub-setup.sh b/tools/aws-grub-setup.sh index 36e4291..ae83045 100644 --- a/tools/aws-grub-setup.sh +++ b/tools/aws-grub-setup.sh @@ -19,10 +19,9 @@ done } # Check if user is root -if [ $(id -u) = 0 ]; then - echo "Please don't run with root or sudo privileges! - > We'll request them when necessary." - exit 1 +if [ $UID != 0 ]; then + echo You need to run this script as root or sudo rights! + exit 1 fi TMP_DIR="$(mktemp -d)"