mirror of
https://github.com/linuxboot/heads.git
synced 2025-03-14 08:16:44 +00:00
apply the same fix for displaying the battery state to: initrd/bin/oem-system-info-xx30
Signed-off-by: gaspar-ilom <gasparilom@riseup.net>
This commit is contained in:
parent
9eb7618e82
commit
02bfdeec98
@ -12,11 +12,13 @@ export BG_COLOR_MAIN_MENU="normal"
|
||||
|
||||
TRACE_FUNC
|
||||
|
||||
battery_charge="$(print_battery_charge)"
|
||||
battery_health="$(print_battery_health)"
|
||||
if [ -n "$battery_charge" ] && [ -n "$battery_health" ]; then
|
||||
battery_status="\nBattery charge: $battery_charge% Battery health: $battery_health%\n"
|
||||
fi
|
||||
battery_status=""
|
||||
for battery in /sys/class/power_supply/BAT*; do
|
||||
if [[ -d "${battery}" ]]; then
|
||||
battery_status+="$(awk '{printf "\\nBattery %s charge: %s%%\\nBattery %s health: %s%%", substr($1,4), $2, substr($1,4), $3}' <<< "$(print_battery_state "${battery}")")"
|
||||
fi
|
||||
done
|
||||
battery_status="${battery_status:+${battery_status}\n}"
|
||||
|
||||
usb="$(lsusb)"
|
||||
pci="$(lspci)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user