mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 04:03:36 +08:00
units: skip systemd-battery-check in environments where it doesn't make sense
Let's condition the service so that it doesn't run where we aren't directly run on baremetal, or where no power sources are discovered at all.
This commit is contained in:
parent
fc613c8450
commit
c65e3d7a9b
@ -10,8 +10,10 @@
|
||||
[Unit]
|
||||
Description=Check battery level during early boot
|
||||
Documentation=man:systemd-battery-check.service(8)
|
||||
DefaultDependencies=no
|
||||
ConditionVirtualization=no
|
||||
ConditionDirectoryNotEmpty=/sys/class/power_supply/
|
||||
AssertPathExists=/etc/initrd-release
|
||||
DefaultDependencies=no
|
||||
After=plymouth-start.service
|
||||
Before=initrd-root-device.target
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user