summaryrefslogtreecommitdiffstats
path: root/powertop.trisquel6
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-11-24 13:23:03 (EST)
committer Francis Rowe <info@gluglug.org.uk>2014-11-24 13:23:03 (EST)
commitfc07688eee2eeb86ed0af2e582a1de328db6775d (patch)
tree64bdfb3ec72e49cebe52a33096609e984fb78ed6 /powertop.trisquel6
parent06421bb21d0f44c6aa9525886461942b3b4413d0 (diff)
downloadlibreboot-fc07688eee2eeb86ed0af2e582a1de328db6775d.zip
libreboot-fc07688eee2eeb86ed0af2e582a1de328db6775d.tar.gz
libreboot-fc07688eee2eeb86ed0af2e582a1de328db6775d.tar.bz2
powertop.trisquel6: check if user is root
Diffstat (limited to 'powertop.trisquel6')
-rwxr-xr-xpowertop.trisquel65
1 files changed, 5 insertions, 0 deletions
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.