All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/swupdate: add progress/usb services
@ 2021-09-11 14:11 Arnout Vandecappelle
  0 siblings, 0 replies; only message in thread
From: Arnout Vandecappelle @ 2021-09-11 14:11 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=0e94459ad52e87033c170522610e83215a444242
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Install progress/usb services for swupdate based on meta-swupdate
configs.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/swupdate/90-start-progress         |  1 +
 package/swupdate/swupdate-progress.service |  9 +++++++++
 package/swupdate/swupdate-usb@.service     |  8 ++++++++
 package/swupdate/swupdate.mk               |  8 ++++++++
 package/swupdate/swupdate.socket           | 11 +++++++++++
 5 files changed, 37 insertions(+)

diff --git a/package/swupdate/90-start-progress b/package/swupdate/90-start-progress
new file mode 100644
index 0000000000..3b0eb5e7d7
--- /dev/null
+++ b/package/swupdate/90-start-progress
@@ -0,0 +1 @@
+exec /usr/bin/swupdate-progress -w -r &
diff --git a/package/swupdate/swupdate-progress.service b/package/swupdate/swupdate-progress.service
new file mode 100644
index 0000000000..0d464bb420
--- /dev/null
+++ b/package/swupdate/swupdate-progress.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=swupdate progress service
+After=swupdate.service
+
+[Service]
+ExecStart=/usr/bin/swupdate-progress -r -w
+
+[Install]
+WantedBy=swupdate.service
diff --git a/package/swupdate/swupdate-usb@.service b/package/swupdate/swupdate-usb@.service
new file mode 100644
index 0000000000..eda9d1539c
--- /dev/null
+++ b/package/swupdate/swupdate-usb@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=usb media swupdate service
+Requires=swupdate-progress.service
+
+[Service]
+ExecStartPre=/bin/mount /dev/%I /mnt
+ExecStart=/bin/sh -c "swupdate-client -v /mnt/*.swu"
+ExecStopPost=/bin/umount /mnt
diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index 4bcdb96602..c49af7ebf7 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -248,6 +248,12 @@ define SWUPDATE_INSTALL_INIT_SYSTEMD
 	$(SWUPDATE_INSTALL_COMMON)
 	$(INSTALL) -D -m 644 package/swupdate/swupdate.service \
 		$(TARGET_DIR)/usr/lib/systemd/system/swupdate.service
+	$(INSTALL) -D -m 644 package/swupdate/swupdate.socket \
+		$(TARGET_DIR)/usr/lib/systemd/system/swupdate.socket
+	$(INSTALL) -D -m 644 package/swupdate/swupdate-usb@.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/swupdate-usb@.service
+	$(INSTALL) -D -m 644 package/swupdate/swupdate-progress.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/swupdate-progress.service
 	$(INSTALL) -D -m 644 package/swupdate/tmpfiles-swupdate.conf \
 		$(TARGET_DIR)/usr/lib/tmpfiles.d/tmpfiles-swupdate.conf
 endef
@@ -255,6 +261,8 @@ define SWUPDATE_INSTALL_INIT_SYSV
 	$(SWUPDATE_INSTALL_COMMON)
 	$(INSTALL) -D -m 755 package/swupdate/S80swupdate \
 		$(TARGET_DIR)/etc/init.d/S80swupdate
+	$(INSTALL) -D -m 644 package/swupdate/90-start-progress \
+		$(TARGET_DIR)/usr/lib/swupdate/conf.d/90-start-progress
 endef
 
 $(eval $(kconfig-package))
diff --git a/package/swupdate/swupdate.socket b/package/swupdate/swupdate.socket
new file mode 100644
index 0000000000..2b756714c5
--- /dev/null
+++ b/package/swupdate/swupdate.socket
@@ -0,0 +1,11 @@
+[Unit]
+Description=SWUpdate socket listener
+Documentation=https://github.com/sbabic/swupdate
+Documentation=https://sbabic.github.io/swupdate
+
+[Socket]
+ListenStream=/tmp/sockinstctrl
+ListenStream=/tmp/swupdateprog
+
+[Install]
+WantedBy=sockets.target
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-11 14:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11 14:11 [Buildroot] [git commit] package/swupdate: add progress/usb services Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.