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