From 2c8fc41c01be4f8da9b585b5183620f35c89976f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Fri, 21 Jun 2019 10:59:59 +0200 Subject: [PATCH 1/3] Closes #97. Implement IS_OSPROBER --- evocheck.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/evocheck.sh b/evocheck.sh index 642b1ab..94b6542 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -1121,6 +1121,14 @@ check_evobackup_incs() { fi } +check_osprober() { + if is_installed os-prober; then + if is_installed qemu-kvm; then + failed "IS_OSPROBER" "Removal of this package is recommended as it can cause serious issue on KVM server" + fi + fi +} + main() { # Default return code : 0 = no error RC=0 @@ -1241,6 +1249,7 @@ main() { test "${IS_MELTDOWN_SPECTRE:=1}" = 1 && check_meltdown_spectre test "${IS_OLD_HOME_DIR:=1}" = 1 && check_old_home_dir test "${IS_EVOBACKUP_INCS:=1}" = 1 && check_evobackup_incs + test "${IS_OSPROBER:=1}" = 1 && check_osprober fi #----------------------------------------------------------- -- 2.39.2 From c4d407417adb7d5bf66daac7c689202805769b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Fri, 21 Jun 2019 11:02:46 +0200 Subject: [PATCH 2/3] Rewording, say the package name in verbose mode --- evocheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evocheck.sh b/evocheck.sh index 94b6542..f8e8688 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -1124,7 +1124,7 @@ check_evobackup_incs() { check_osprober() { if is_installed os-prober; then if is_installed qemu-kvm; then - failed "IS_OSPROBER" "Removal of this package is recommended as it can cause serious issue on KVM server" + failed "IS_OSPROBER" "Removal of os-prober package is recommended as it can cause serious issue on KVM server" fi fi } -- 2.39.2 From afb6099f88bb95f47a8a54a14d59fabe1bf68876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Fri, 21 Jun 2019 11:13:46 +0200 Subject: [PATCH 3/3] We can use multiple packages in is_installed --- evocheck.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/evocheck.sh b/evocheck.sh index f8e8688..7fb8e8f 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -1122,10 +1122,8 @@ check_evobackup_incs() { } check_osprober() { - if is_installed os-prober; then - if is_installed qemu-kvm; then - failed "IS_OSPROBER" "Removal of os-prober package is recommended as it can cause serious issue on KVM server" - fi + if is_installed os-prober qemu-kvm; then + failed "IS_OSPROBER" "Removal of os-prober package is recommended as it can cause serious issue on KVM server" fi } -- 2.39.2