mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-26 22:46:32 +00:00
Change rauc mark handling
This commit is contained in:
parent
c657f6f3e7
commit
49df049f2c
@ -1,2 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
OnFailure=rauc-bad.service
|
|
@ -1 +0,0 @@
|
|||||||
/usr/lib/systemd/system/rauc-good.timer
|
|
@ -0,0 +1 @@
|
|||||||
|
/usr/lib/systemd/system/rauc-mark.timer
|
@ -2,6 +2,8 @@
|
|||||||
Description=HassOS data resizing
|
Description=HassOS data resizing
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
Before=mnt-data.mount
|
Before=mnt-data.mount
|
||||||
|
RefuseManualStart=true
|
||||||
|
RefuseManualStop=true
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=HassOS rauc bad
|
|
||||||
Requires=rauc.service
|
|
||||||
RefuseManualStart=true
|
|
||||||
RefuseManualStop=true
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
ExecStart=/usr/bin/rauc status mark-bad
|
|
||||||
ExecStartPost=/usr/bin/systemctl reboot
|
|
@ -1,10 +1,9 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=HassOS rauc good
|
Description=HassOS rauc good
|
||||||
Requires=hassos-supervisor.service rauc.service
|
|
||||||
RefuseManualStart=true
|
RefuseManualStart=true
|
||||||
RefuseManualStop=true
|
RefuseManualStop=true
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/bin/rauc status mark-good
|
ExecStart=/usr/sbin/hassos-rate
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
@ -2,6 +2,8 @@
|
|||||||
Description=HassOS ZRAM swap
|
Description=HassOS ZRAM swap
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
Before=dev-zram0.swap
|
Before=dev-zram0.swap
|
||||||
|
RefuseManualStart=true
|
||||||
|
RefuseManualStop=true
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
Description=HassOS ZRAM tmp
|
Description=HassOS ZRAM tmp
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
Before=tmp.mount
|
Before=tmp.mount
|
||||||
|
RefuseManualStart=true
|
||||||
|
RefuseManualStop=true
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
Description=HassOS ZRAM var
|
Description=HassOS ZRAM var
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
Before=var.mount
|
Before=var.mount
|
||||||
|
RefuseManualStart=true
|
||||||
|
RefuseManualStop=true
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
26
buildroot-external/rootfs-overlay/usr/sbin/hassos-rate
Executable file
26
buildroot-external/rootfs-overlay/usr/sbin/hassos-rate
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
|
||||||
|
function mark_good() {
|
||||||
|
rauc status mark-good
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
function mark_bad() {
|
||||||
|
rauc status mark-bad
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Docker state
|
||||||
|
if ! systemctl -q is-active docker; then
|
||||||
|
mark_bad
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Docker state
|
||||||
|
if ! systemctl -q is-active hassos-supervisor; then
|
||||||
|
mark_bad
|
||||||
|
fi
|
||||||
|
|
||||||
|
mark_good
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user