summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts
diff options
context:
space:
mode:
authorBryan Evenson <bevenson@melinkcorp.com>2015-04-14 17:08:16 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-20 15:01:35 +0100
commit317269b4a5c698e30b87bd597b436283512cbde9 (patch)
tree6c74e5f3d61dd9d5cab407a7ed8af62c9e3ad631 /meta/recipes-core/initscripts
parent272805f064848f14306b1ed2648a7760017ee318 (diff)
downloadopenembedded-core-contrib-317269b4a5c698e30b87bd597b436283512cbde9.tar.gz
openembedded-core-contrib-317269b4a5c698e30b87bd597b436283512cbde9.tar.bz2
openembedded-core-contrib-317269b4a5c698e30b87bd597b436283512cbde9.zip
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@melinkcorp.com>
Diffstat (limited to 'meta/recipes-core/initscripts')
-rw-r--r--meta/recipes-core/initscripts/initscripts_1.0.bb5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index dfb75b261b..a086591b80 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"