mirror of
https://github.com/speed47/spectre-meltdown-checker
synced 2024-12-21 20:03:36 +01:00
enh: move root warning to the bottom
This commit is contained in:
parent
c1c1ac4dbb
commit
aca4e2a9b1
@ -2441,13 +2441,6 @@ if [ "$opt_cpu" != all ] && [ "$opt_cpu" -gt "$max_core_id" ]; then
|
||||
fi
|
||||
|
||||
if [ "$opt_live" = 1 ]; then
|
||||
# root check (only for live mode, for offline mode, we already checked if we could read the files)
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
_warn "Note that you should launch this script with root privileges to get accurate information."
|
||||
_warn "We'll proceed but you might see permission denied errors."
|
||||
_warn "To run it as root, you can try the following command: sudo $0"
|
||||
_warn
|
||||
fi
|
||||
_info "Checking for vulnerabilities on current system"
|
||||
_info "Kernel is \033[35m$os $(uname -r) $(uname -v) $(uname -m)\033[0m"
|
||||
_info "CPU is \033[35m$cpu_friendly_name\033[0m"
|
||||
@ -6326,6 +6319,13 @@ if [ -n "$mockme" ] && [ "$opt_mock" = 1 ]; then
|
||||
_warn "To mock this CPU, set those vars: "$(echo "$mockme" | sort -u)
|
||||
fi
|
||||
|
||||
# root check
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
_warn "Note that you should launch this script with root privileges to get completely accurate information."
|
||||
_warn "To run it as root, you can try the following command: sudo $0"
|
||||
_warn
|
||||
fi
|
||||
|
||||
if [ "$opt_explain" = 0 ]; then
|
||||
_info "Need more detailed information about mitigation options? Use --explain"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user