[oe-commits] Bryan Evenson : initscripts: Remove /etc/volatile.cache on upgrade
git at git.openembedded.org
git at git.openembedded.org
Mon Apr 20 14:04:25 UTC 2015
Module: openembedded-core.git
Branch: master
Commit: 317269b4a5c698e30b87bd597b436283512cbde9
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=317269b4a5c698e30b87bd597b436283512cbde9
Author: Bryan Evenson <bevenson at melinkcorp.com>
Date: Tue Apr 14 17:08:16 2015 -0400
initscripts: Remove /etc/volatile.cache on upgrade
/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 dfb75b2..a086591 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -163,6 +163,11 @@ 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
}
CONFFILES_${PN} += "${sysconfdir}/init.d/checkroot.sh"
More information about the Openembedded-commits
mailing list