aboutsummaryrefslogtreecommitdiff
path: root/man/rc_service.3
diff options
context:
space:
mode:
authorSven Wegener <sven.wegener@stealer.net>2021-07-04 13:19:43 +0200
committerWilliam Hubbs <w.d.hubbs@gmail.com>2021-08-13 13:38:07 -0500
commit63955056ecb98faa1a02d90d5a4742515f0299c8 (patch)
treea43e1bbf1aac208afbe473eab2e44a3e43a8f633 /man/rc_service.3
parent1e975be89670f53db47aeef3dbb3361166517c26 (diff)
on_ac_power: support multiple power_supply devices in sysfs
Newer devices have multiple power_supply devices in sysfs: $ grep ^ /sys/class/power_supply/*/type /sys/class/power_supply/AC/type:Mains /sys/class/power_supply/BAT0/type:Battery /sys/class/power_supply/ucsi-source-psy-USBC000:001/type:USB /sys/class/power_supply/ucsi-source-psy-USBC000:002/type:USB There are two "USB" Type-C ports than can supply power and both are aggregated into the "Mains" power supply by the firmware. The "Battery" also counts as a power supply, but is missing the online attribute. The -f check with a wildcard pattern results in an error, when multiple devices are present: /lib/rc/bin/on_ac_power: line 21: [: too many arguments When the power_supply class is registered, check for a "Mains" device. Fixes #427.
Diffstat (limited to 'man/rc_service.3')
0 files changed, 0 insertions, 0 deletions