mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
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.
This commit is contained in:
parent
731508a93f
commit
14eb4aff0f
2
inxi
2
inxi
|
@ -884,7 +884,7 @@ initialize_data()
|
||||||
else
|
else
|
||||||
# found a case of battery existing but having nothing in it on desktop mobo
|
# 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.
|
# 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'
|
B_PORTABLE='true'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue