summaryrefslogtreecommitdiff
path: root/meta-phosphor/common/recipes-core
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2017-11-01 22:09:04 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-01-17 04:01:51 +0300
commit1e445244992dcd70eceb1b07ee1df5d6a4ab15ae (patch)
treefbef5769a8181e4096ac7a8a59da9206b2eca458 /meta-phosphor/common/recipes-core
parent9abc62353d60a18e160bdd14ac06f37384eb72fc (diff)
downloadopenbmc-1e445244992dcd70eceb1b07ee1df5d6a4ab15ae.tar.xz
Exclude /tmp/images from cleanup
/tmp is deleted every 10 days /usr/lib/tmpfiles.d/tmp.conf does this cleanup with this entry, "q /tmp 1777 root root 10d". Exclude /tmp/images from the cleanup, by adding "x /tmp/images" to /usr/lib/tmpfiles.d/software.conf, if a feature of the machine is obmc-ubi-fs or openpower-ubi-fs. Resolves openbmc/openbmc#2544 Change-Id: I3ead88724adcd63ebfd809d310109a19232b1def Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-core')
-rw-r--r--meta-phosphor/common/recipes-core/systemd/systemd/software.conf3
-rw-r--r--meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend8
2 files changed, 11 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd/software.conf b/meta-phosphor/common/recipes-core/systemd/systemd/software.conf
new file mode 100644
index 000000000..09ecd92e4
--- /dev/null
+++ b/meta-phosphor/common/recipes-core/systemd/systemd/software.conf
@@ -0,0 +1,3 @@
+# /tmp/images is the software image upload directory
+# It should not be deleted if the UBI code update is used.
+x /tmp/images
diff --git a/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend b/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
index dd8cddd64..52edfc5c1 100644
--- a/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-phosphor/common/recipes-core/systemd/systemd_%.bbappend
@@ -16,6 +16,7 @@ SRC_URI += "file://0004-basic-Use-path-escaping-when-mangling-path-instances.pat
SRC_URI += "file://0005-dont-return-error-if-unable-to-create-network-namespace.patch"
SRC_URI += "file://0006-journal-Create-journald-dbus-object.patch"
SRC_URI += "file://0007-journal-Add-Synchronize-dbus-method.patch"
+SRC_URI += "${@mf_enabled(d, 'obmc-ubi-fs', 'file://software.conf')}"
RRECOMMENDS_${PN} += "obmc-targets"
FILES_${PN} += "${libdir}/systemd/network/default.network"
@@ -30,4 +31,11 @@ do_install_append() {
#TODO Remove after this issue is resolved
#https://github.com/openbmc/openbmc/issues/152
ln -s /dev/null ${D}/etc/systemd/system/systemd-hwdb-update.service
+
+ # /tmp/images is the software image upload directory.
+ # It should not be deleted since it is watched by the Image Manager
+ # for new images.
+ if ${@bb.utils.contains('MACHINE_FEATURES', 'obmc-ubi-fs', 'true', 'false', d)}; then
+ install -m 0644 ${WORKDIR}/software.conf ${D}${exec_prefix}/lib/tmpfiles.d/
+ fi
}