From fc07688eee2eeb86ed0af2e582a1de328db6775d Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Mon, 24 Nov 2014 18:23:03 +0000 Subject: powertop.trisquel6: check if user is root --- powertop.trisquel6 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/powertop.trisquel6 b/powertop.trisquel6 index 2b9ee64..09a569b 100755 --- a/powertop.trisquel6 +++ b/powertop.trisquel6 @@ -20,6 +20,11 @@ set -u -e -v +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root" + exit 1 +fi + # For Trisquel 6.0 (and 6.0.1) users. # This may also work on other apt distros. -- cgit v1.1-4-g5e80