]> code.ossystems Code Review - openembedded-core.git/commitdiff
initscripts: Remove /etc/volatile.cache on upgrade
authorBryan Evenson <bevenson@melinkcorp.com>
Tue, 14 Apr 2015 21:08:16 +0000 (17:08 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 17 Apr 2015 21:38:35 +0000 (22:38 +0100)
/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>
meta/recipes-core/initscripts/initscripts_1.0.bb

index a665acf6e4b911403cacb7546986195d6e11b0cc..775816a37f1306988080008a5f502478a6e749b6 100644 (file)
@@ -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
 }