瀏覽代碼

swupdate: systemd units from master

Signed-off-by: Stefano Babic <sbabic@denx.de>
Stefano Babic 7 年之前
父節點
當前提交
0bd9c6d9f7

+ 6 - 0
recipes-support/swupdate/swupdate/swupdate-progress.service

@@ -0,0 +1,6 @@
+[Unit]
+Description=swupdate progress service
+Requires=swupdate.service
+
+[Service]
+ExecStart=/usr/bin/swupdate-progress -r -w

+ 2 - 0
recipes-support/swupdate/swupdate/swupdate-usb.rules

@@ -0,0 +1,2 @@
+ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", TAG+="systemd", ENV{SYSTEMD_WANTS}+="swupdate-usb@%k.service"
+

+ 8 - 0
recipes-support/swupdate/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