From 14eb4aff0f2bacbd56cb97ac4c86d1882a3d74cf Mon Sep 17 00:00:00 2001 From: Harald Hope Date: Mon, 18 Apr 2016 17:33:00 -0700 Subject: [PATCH] small fix in portable detection, some systems have BAT1 but NOT BAT0, so now just check if /sys/class/power_supply directory is empty or not. --- inxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inxi b/inxi index defb327..b493049 100755 --- a/inxi +++ b/inxi @@ -884,7 +884,7 @@ initialize_data() else # found a case of battery existing but having nothing in it on desktop mobo # not all laptops show the first. /proc/acpi/battery is deprecated. - if [[ -n $( ls /proc/acpi/battery 2>/dev/null ) || -e /sys/class/power_supply/BAT0/ ]];then + if [[ -n $( ls /proc/acpi/battery 2>/dev/null ) || -n $( ls /sys/class/power_supply/ 2>/dev/null ) ]];then B_PORTABLE='true' fi fi