Skip to content

Commit

Permalink
bug: make lscpu conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
robertpeteuil committed Jan 15, 2024
1 parent fe77834 commit 932de48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sysis
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@


scriptname="sysis"
scriptbuildnum="3.8.1"
scriptbuilddate="2024-01-03"
scriptbuildnum="3.8.2"
scriptbuilddate="2024-01-15"

############################################################
### VARS INITS
Expand Down Expand Up @@ -282,7 +282,7 @@ setLinuxCommon() {
else # plan c - use uname
OSfullname="${SYSkernal}"
fi
if [ -e "/sys/devices/system/cpu/possible" ]; then
if [[ -e "/sys/devices/system/cpu/possible" ]] && [[ $(lscpu -h 2> /dev/null) ]]; then
if lscpu | grep -q -m1 'max MHz'; then
CPUspeed=$(lscpu | grep -m1 'max MHz') # exists on adj. proc
else
Expand Down

0 comments on commit 932de48

Please sign in to comment.