3333# ### Variables
3434# #######################################################################
3535#  Versioning
36- version=" Version: 01.00-08 , Script Date: 2022.03.10 " 
36+ version=" Version: 01.00-09 , Script Date: 2022.06.01 " 
3737# md5_sum=$(md5sum $sname | sed 's/system.*//g' )
3838arg1=$1 
3939arg2=$2 
@@ -447,6 +447,9 @@ function GetSb()
447447    #  Gets SafeBoot Info from UEFI BIOS or if not UEFI capable. Called once by GetDMI().
448448    #  Warns user if mokutil was not present.
449449    # echo -e "   --- SecureBoot Status from 'mokutil --sb-state':"
450+     
451+     # # Bug found on some machines concerning the '--sb-state' option switch on 2022.06.01.
452+     #   Shortened to '--sb' (undocumented option switch) 
450453    if  [ $check_mokutil  -eq  0 ] 
451454    then 
452455        echo  -e " \tThis would check / have checked if SecureBoot was enabled or not, " 
@@ -455,7 +458,8 @@ function GetSb()
455458        echo  -e " \tthis information, please install 'mokutil' and rerun script." 
456459    else 
457460        #  For Legacy only BIOS, returns error: "EFI variables are not supported on this system"
458-         error_mokutil=$( mokutil --sb-state 2>&1  ) 
461+         # error_mokutil=$(mokutil --sb-state 2>&1 )
462+         error_mokutil=$( mokutil --sb 2>&1  ) 
459463        if  [[  " $error_mokutil " ==  * " EFI variables" *   ]]
460464        then 
461465            echo  -e " $error_mokutil " 
@@ -466,18 +470,21 @@ function GetSb()
466470                echo  -e " \tbut package mokutil was not installed. If you would like to check" 
467471                echo  -e " \tthis information, please install 'mokutil' and rerun script." 
468472        else 
469-             sb_state=$( mokutil --sb-state 2>&1  ) 
473+             # sb_state=$(mokutil --sb-state 2>&1 )
474+             sb_state=$( mokutil --sb 2>&1  ) 
470475            debug " sb_state: $sb_state " 
471476            if  [[ $sb_state  ==  " Failed to read SecureBoot" 
472477            then 
473478                sb_disabled=" SecureBoot: Disabled" 
474479                # printf "%-20s %s\n" ${sb_disabled/ /: }
475480                echo  -e " $sb_disabled " 
476481            else 
477-                 #  These are the three  known messages returned from UEFI
482+                 #  These are the four  known messages returned from UEFI
478483                #  This system doesn't support Secure Boot
479484                #  Secure Boot is enabled
480485                #  Failed to read SecureBoot
486+                 #  Platform is in Setup Mode
487+                 # 
481488                # printf "%-20s %s\n" ${sb_state/ /: }
482489                echo  -e " $sb_state " 
483490            fi 
@@ -658,7 +665,7 @@ function GetStorageControllers() {
658665    if  [ !  -z  " $cntrllr_busid_list " 
659666    then 
660667        #  Parse through list )array) and show detailed information on each
661-         for  controller  in  " ${cntrllr_busid_list} " 
668+         for  controller  in  ${cntrllr_busid_list} 
662669        do 
663670            sudo lspci -s $controller  -vv
664671            nl
@@ -861,7 +868,7 @@ function GetDistUpgradeDate()
861868}
862869
863870function  GetHweRange()  {
864-     #  Valid current choices for Release numbers LTS are: 18.04, 20.04
871+     #  Valid current choices for Release numbers LTS are: 18.04, 20.04, 22.04 
865872    LSB_Rel=$( lsb_release -sr |  cut -c 1-5) 
866873    case  " $LSB_Rel " in 
867874        (" 18.04" 
@@ -878,8 +885,12 @@ function GetHweRange() {
878885            ;;
879886        (" 22.04" 
880887            LTS_PKG=" 22.04" 
888+             ;;
889+         (" 22.10" 
890+             LTS_PKG=" 22.04" 
891+             ;;
881892        (* )
882-             echo  -e " Something went wrong. Error  out of range." 
893+             echo  -e " Something went wrong. LTS Edition  out of HWE support  range." 
883894            exit  1
884895    esac     
885896
0 commit comments