From 3a3bd4b89cabfbe001b4d35175ee4470a83b3c8b Mon Sep 17 00:00:00 2001 From: Ark74 Date: Mon, 5 Oct 2020 07:26:10 -0500 Subject: [PATCH] Improve kernel detection --- tools/test-jibri-env.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/test-jibri-env.sh b/tools/test-jibri-env.sh index 4d8929b..19641a1 100644 --- a/tools/test-jibri-env.sh +++ b/tools/test-jibri-env.sh @@ -65,6 +65,14 @@ if [ -z $SND_AL_MODULE ]; then echo -e "\nIf you just installed a new kernel, \ please try rebooting.\nFor now wait 'til the end of the recommended kernel installation." echo "# Check and Install HWE kernel if possible..." + if $(uname -r | grep aws);then + KNL_HWE="$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr)|head -n1|awk '{print$3}'|cut -d "." -f1-4)" + KNL_MENU="$(awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg | grep generic | grep -v recovery | awk '{print$3,$4}'|grep $KNL_HWE)" + if [ ! -z "$KNL_MENU" ];then + echo -e "Seems you are using an AWS kernel! \nYou might consider modify your grub (/etc/default/grub) to use the following:" && \ + echo "$KNL_MENU" + fi + fi if [ "$HWE_VIR_MOD" == "1" ]; then apt-get -y install \ linux-image-generic-hwe-$(lsb_release -sr) \