package/swupdate: prevent systemd from removing swupdate tmp folders
authorJames Hilliard <james.hilliard1@gmail.com>
Sun, 29 Aug 2021 02:46:31 +0000 (20:46 -0600)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sat, 11 Sep 2021 14:11:47 +0000 (16:11 +0200)
Ensure these folders are excluded from being cleaned up by systemd.

Fixes:
[ERROR] : SWUPDATE failed [0] ERROR : I cannot open /tmp/scripts/format.lua 2
[ERROR] : SWUPDATE failed [0] ERROR : extracting script to /tmp/scripts/ failed
[ERROR] : SWUPDATE failed [1] Installation failed !

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/swupdate/swupdate.mk
package/swupdate/tmpfiles-swupdate.conf [new file with mode: 0644]

index cf3607a66131f6c096d2bf63f5343857991fc959..4bcdb96602c02dc9f23eb17d35f90b1cd3bc3734 100644 (file)
@@ -248,6 +248,8 @@ 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/tmpfiles-swupdate.conf \
+               $(TARGET_DIR)/usr/lib/tmpfiles.d/tmpfiles-swupdate.conf
 endef
 define SWUPDATE_INSTALL_INIT_SYSV
        $(SWUPDATE_INSTALL_COMMON)
diff --git a/package/swupdate/tmpfiles-swupdate.conf b/package/swupdate/tmpfiles-swupdate.conf
new file mode 100644 (file)
index 0000000..4743672
--- /dev/null
@@ -0,0 +1,2 @@
+X /tmp/datadst
+X /tmp/scripts