[OE-core] [dizzy][PATCHv2 2/2] initscripts: Remove /etc/volatile.cache on upgrade
Bryan Evenson
bevenson at melinkcorp.com
Tue Apr 14 21:08:16 UTC 2015
/etc/volatile.cache is a cached copy of a script (which is
generated by /etc/init.d/populate-volatile.sh) that generates
the volatile filesystem directories. Since volatile.cache is
a generated file, it is not necessarily changed if
populate-volatile.sh is updated. As a result, the stale script
can add/remove the wrong directories on the next system boot.
If initscripts is being upgraded, make sure volatile.cache gets
deleted.
Signed-off-by: Bryan Evenson <bevenson at melinkcorp.com>
---
meta/recipes-core/initscripts/initscripts_1.0.bb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index a665acf..775816a 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -161,4 +161,9 @@ pkg_postinst_${PN} () {
systemctl $OPTS mask $SERVICE.service
done
fi
+
+ # Delete any old volatile cache script, as directories may have moved
+ if [ -z "$D" ]; then
+ rm -f "/etc/volatile.cache"
+ fi
}
--
2.1.0
More information about the Openembedded-core
mailing list