From c423ebef45068ab6256b2d7540a58711a59da0e9 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Fri, 10 Jan 2020 13:36:55 +0900 Subject: [PATCH] Support with busybox's ps command busybox's ps command does not have 'ax' option. ---- CVE-2018-3620: OK (your CPU vendor reported your CPU model as not vulnerable) ps: invalid option -- 'a' BusyBox v1.30.1 (2020-01-07 07:47:10 UTC) multi-call binary. Usage: ps ---- And busybox's ps command provides output similar to ax. This supports busybox's ps command. Signed-off-by: Nobuhiro Iwamatsu --- spectre-meltdown-checker.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index 3c35f2a..9b74d93 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -3070,7 +3070,13 @@ check_has_vmm() else # ignore SC2009 as `ps ax` is actually used as a fallback if `pgrep` isn't installed # shellcheck disable=SC2009 - if ps ax | grep -vw grep | grep -q -e '\ /dev/null 2&>1 + if [ $? -eq 0 ] ; then + PS='ps' + fi + if $PS | grep -vw grep | grep -q -e '\