summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAnton D. Kachalov <gmouse@google.com>2021-03-21 11:26:16 +0100
committerAnuj Mittal <anuj.mittal@intel.com>2021-04-09 14:01:25 +0800
commit214056938f8408c75b68002643789284eabd0389 (patch)
tree9b0f0a8f11959f4194d103597954b14fd956d546 /meta
parent0e7feade706a4a88181a45ca4999051994a5aaab (diff)
downloadopenembedded-core-214056938f8408c75b68002643789284eabd0389.tar.gz
run-postinsts: do not remove postinsts directory.
When running on the systems having read-only rootfs backed by overlayfs, removing the whole directory lead to create a special char device file on the upperdir to reflect directory's removal. Once it is required to upgrade the whole read-only image that might contain new postinsts scripts, it will be impossible to run such scripts with a "deletion mark" file on the overlayfs -- the whole directory will be marked as deleted regardless new files in it. Signed-off-by: Anton D. Kachalov <gmouse@google.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1a27b62b225ffeecec47c249a0b86cc54d775add) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'meta')
-rwxr-xr-xmeta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts10
1 files changed, 4 insertions, 6 deletions
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index f84a7e18c8..95dccb9cae 100755
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -72,12 +72,12 @@ exec_postinst_scriptlets() {
else
echo "ERROR: postinst $i failed."
[ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i failed." $append_log
- remove_pi_dir=0
+ remove_rcsd_link=0
fi
done
}
-remove_pi_dir=1
+remove_rcsd_link=1
if $pm_installed; then
case $pm in
"ipk")
@@ -92,9 +92,7 @@ else
exec_postinst_scriptlets
fi
-# since all postinstalls executed successfully, remove the postinstalls directory
-# and the rcS.d link
-if [ $remove_pi_dir = 1 ]; then
- rm -rf $pi_dir
+# since all postinstalls executed successfully, remove the rcS.d link
+if [ $remove_rcsd_link = 1 ]; then
remove_rcsd_link
fi