aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Lesimple <speed47_github@speed47.net>2018-01-08 08:58:21 +0100
committerGitHub <noreply@github.com>2018-01-08 08:58:21 +0100
commit5c14384e15e0a5bb9b94a53f758ede0c17228f3d (patch)
tree54022693f7c2496cf75721eca80d5d05aa2f05b4
parent96dfa03c000052e9d69ba00c62327caa83aa34bf (diff)
parent1aaca63dcf3f343842ff83463fa9d2dde3b25426 (diff)
downloadspectre-meltdown-checker-5c14384e15e0a5bb9b94a53f758ede0c17228f3d.tar.lz
spectre-meltdown-checker-5c14384e15e0a5bb9b94a53f758ede0c17228f3d.tar.xz
spectre-meltdown-checker-5c14384e15e0a5bb9b94a53f758ede0c17228f3d.zip
Merge pull request #1 from t-nelis/root-check
Improve "running as root" check
-rwxr-xr-xspectre-meltdown-checker.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh
index b0ac923..c52d3d0 100755
--- a/spectre-meltdown-checker.sh
+++ b/spectre-meltdown-checker.sh
@@ -256,7 +256,7 @@ fi
/bin/echo
-if [ "$USER" != root ]; then
+if [ "$(id -u)" -ne 0 ]; then
/bin/echo "Note that you should launch this script with root privileges to get accurate information"
/bin/echo "You can try the following command: sudo $0"
fi