mirror of
https://github.com/speed47/spectre-meltdown-checker.git
synced 2025-07-07 03:15:26 +02:00
CoreOS: warn if launched without --coreos option
This commit is contained in:
parent
1f2543cfeb
commit
2cd55f5445
@ -516,6 +516,12 @@ unload_cpuid()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_coreos()
|
||||||
|
{
|
||||||
|
which coreos-install >/dev/null && which toolbox >/dev/null && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
# check for mode selection inconsistency
|
# check for mode selection inconsistency
|
||||||
if [ "$opt_live_explicit" = 1 ]; then
|
if [ "$opt_live_explicit" = 1 ]; then
|
||||||
if [ -n "$opt_kernel" -o -n "$opt_config" -o -n "$opt_map" ]; then
|
if [ -n "$opt_kernel" -o -n "$opt_config" -o -n "$opt_map" ]; then
|
||||||
@ -527,7 +533,7 @@ fi
|
|||||||
|
|
||||||
# coreos mode
|
# coreos mode
|
||||||
if [ "$opt_coreos" = 1 ]; then
|
if [ "$opt_coreos" = 1 ]; then
|
||||||
if ! which coreos-install || ! which toolbox; then
|
if ! is_coreos; then
|
||||||
_warn "CoreOS mode asked, but we're not under CoreOS!"
|
_warn "CoreOS mode asked, but we're not under CoreOS!"
|
||||||
exit 255
|
exit 255
|
||||||
fi
|
fi
|
||||||
@ -541,6 +547,11 @@ if [ "$opt_coreos" = 1 ]; then
|
|||||||
unload_cpuid
|
unload_cpuid
|
||||||
unload_msr
|
unload_msr
|
||||||
exit $exitcode
|
exit $exitcode
|
||||||
|
else
|
||||||
|
if is_coreos; then
|
||||||
|
_warn "You seem to be running CoreOS, you might want to use the --coreos option for better results"
|
||||||
|
_warn
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# root check (only for live mode, for offline mode, we already checked if we could read the files)
|
# root check (only for live mode, for offline mode, we already checked if we could read the files)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user