summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngar <ingar@telenet.be>2022-02-13 16:13:10 +0100
committerIngar <ingar@telenet.be>2022-02-13 16:13:10 +0100
commitbe011ccff1c55d6d07a1d2259165c5a9ac75f9fa (patch)
tree8b26e73fc1b05ab41cd501efd238690f1e656d07
parentf886626e84b99eacda30baf8ce3e2827e8bb6cc7 (diff)
Fixed systemd boot status handling.
-rw-r--r--Makefile3
-rw-r--r--ledctl.py4
-rw-r--r--systemd/led-boot.service2
-rw-r--r--systemd/led-ready.service2
-rw-r--r--systemd/led-reboot.service10
5 files changed, 7 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 5806a91..2777bb8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,5 @@
install:
install -m 744 ledctl.py /usr/bin/ledctl
+ ln -sf /usr/bin/ledctl /usr/lib/systemd/system-shutdown/
install -m 644 systemd/led-boot.service /etc/systemd/system/led-boot.service
install -m 644 systemd/led-ready.service /etc/systemd/system/led-ready.service
- install -m 644 systemd/led-reboot.service /etc/systemd/system/led-reboot.service
- install -m 644 systemd/led-shutdown.service /etc/systemd/system/led-shutdown.service
diff --git a/ledctl.py b/ledctl.py
index 5f7caed..da42efa 100644
--- a/ledctl.py
+++ b/ledctl.py
@@ -62,7 +62,11 @@ def rgbval(colorname):
'cyan': (0, 255, 255),
'pink': (255, 0, 255),
'boot': (63, 15, 0),
+ 'reboot' : (63, 15, 0),
'ready': (0, 15, 0),
+ 'halt' : (0, 0, 0),
+ 'poweroff' : (0, 0, 0),
+ 'kexec' : (63, 0, 63),
}
return switch.get(colorname, (255, 255, 255))
diff --git a/systemd/led-boot.service b/systemd/led-boot.service
index 5112f8b..2414c8f 100644
--- a/systemd/led-boot.service
+++ b/systemd/led-boot.service
@@ -3,7 +3,7 @@ Description=ledctl to indicate boot in progress status.
After=local-fs.target
[Service]
-Type=simple
+Type=oneshot
ExecStart=/usr/bin/ledctl boot
[Install]
diff --git a/systemd/led-ready.service b/systemd/led-ready.service
index 79544ed..1dc62e9 100644
--- a/systemd/led-ready.service
+++ b/systemd/led-ready.service
@@ -3,7 +3,7 @@ Description=ledctl indicate ready status
After=multi-user.target
[Service]
-Type=simple
+Type=oneshot
ExecStart=/usr/bin/ledctl ready
[Install]
diff --git a/systemd/led-reboot.service b/systemd/led-reboot.service
deleted file mode 100644
index 4214d9c..0000000
--- a/systemd/led-reboot.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=ledctl to indicate reboot in progress status.
-DefaultDependencies=no
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/ledctl boot
-
-[Install]
-WantedBy=reboot.target