Feature 57 (config and provisioning): modules declare config and provisions, their files rendered from templates; synced with main (issues of feature 57, 874)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# Written by the mesh (module power, novox/hq ADR 0211). Replaced on every push.
|
||||
#
|
||||
# The power key and the lid, from this module's settings: the mesh's, then this machine's.
|
||||
[Login]
|
||||
HandlePowerKey=${config:handle-power-key}
|
||||
HandleLidSwitch=${config:handle-lid-switch}
|
||||
HandleLidSwitchExternalPower=${config:handle-lid-switch-external-power}
|
||||
HandleLidSwitchDocked=${config:handle-lid-switch-docked}
|
||||
@@ -0,0 +1,3 @@
|
||||
# Written by the mesh (module power, novox/hq ADR 0211). Replaced on every push.
|
||||
[Unit]
|
||||
Wants=mesh-power-after-wake.service
|
||||
@@ -0,0 +1,3 @@
|
||||
# Written by the mesh (module power, novox/hq ADR 0211). Replaced on every push.
|
||||
[Unit]
|
||||
Wants=mesh-power-after-wake.service
|
||||
@@ -0,0 +1,13 @@
|
||||
# Written by the mesh (module power, novox/hq ADR 0211). Replaced on every push.
|
||||
[Unit]
|
||||
Description=Every module's code after boot (mesh power)
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/local/lib/mesh-power/bin/power-moment after-boot
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,11 @@
|
||||
# Written by the mesh (module power, novox/hq ADR 0211). Replaced on every push.
|
||||
#
|
||||
# Pulled in by the four sleep targets through this module's drop-ins on them, and ordered after
|
||||
# them, so it runs once the machine is awake again. Never enabled.
|
||||
[Unit]
|
||||
Description=Every module's code after waking (mesh power)
|
||||
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/lib/mesh-power/bin/power-moment after-wake
|
||||
@@ -0,0 +1,18 @@
|
||||
# Written by the mesh (module power, novox/hq ADR 0211). Replaced on every push.
|
||||
#
|
||||
# Started at boot and left active; stopping it is the shutdown. Ordered after the network, so at
|
||||
# shutdown it stops, and runs every module's code, while the network is still up.
|
||||
[Unit]
|
||||
Description=Every module's code before shutdown (mesh power)
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/bin/true
|
||||
ExecStop=/usr/local/lib/mesh-power/bin/power-moment before-shutdown
|
||||
TimeoutStopSec=120
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,11 @@
|
||||
# Written by the mesh (module power, novox/hq ADR 0211). Replaced on every push.
|
||||
#
|
||||
# Pulled in by sleep.target through this module's drop-in on it, never enabled: a one-shot waiting
|
||||
# for a sleep is not a service whose state the mesh can declare.
|
||||
[Unit]
|
||||
Description=Every module's code before sleep (mesh power)
|
||||
Before=sleep.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/lib/mesh-power/bin/power-moment before-sleep
|
||||
@@ -0,0 +1,10 @@
|
||||
# Written by the mesh (module power, novox/hq ADR 0211). Replaced on every push.
|
||||
#
|
||||
# Started by the module's udev rule when a power supply changes; runs on-mains or on-battery once per
|
||||
# change of source.
|
||||
[Unit]
|
||||
Description=Every module's code for the power source (mesh power)
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/lib/mesh-power/bin/power-moment supply
|
||||
@@ -0,0 +1,3 @@
|
||||
# Written by the mesh (module power, novox/hq ADR 0211). Replaced on every push.
|
||||
[Unit]
|
||||
Wants=mesh-power-before-sleep.service
|
||||
@@ -0,0 +1,3 @@
|
||||
# Written by the mesh (module power, novox/hq ADR 0211). Replaced on every push.
|
||||
[Unit]
|
||||
Wants=mesh-power-after-wake.service
|
||||
@@ -0,0 +1,3 @@
|
||||
# Written by the mesh (module power, novox/hq ADR 0211). Replaced on every push.
|
||||
[Unit]
|
||||
Wants=mesh-power-after-wake.service
|
||||
Reference in New Issue
Block a user