X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=meta-agl%2Frecipes-devtools%2Frun-agl-postinsts%2Frun-agl-postinsts%2Frun-agl-postinsts;h=1d1a5a0592aed1eb8e98543ddbef32cd0719aaa2;hb=a6ac2a509d6157a76cd0be333f32fd1e9b52a0a3;hp=7c2effa70590effdb8b901ad2b3da8b4a51923bf;hpb=67f1d7f631f20dfb4be3765ec32dfcd237d649c5;p=AGL%2Fmeta-agl.git diff --git a/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts b/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts index 7c2effa70..1d1a5a059 100755 --- a/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts +++ b/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts @@ -23,10 +23,16 @@ exec_postinst_scriptlets() { [ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log if [ -x $i ]; then eval sh -c $i $append_log - rm $i + if [ $? -eq 0 ]; then + rm $i + else + echo "ERROR: postinst $i failed." + [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i failed." $append_log + remove_agl_pi_dir=0 + fi else - echo "ERROR: postinst $i failed." - [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i failed." $append_log + echo "ERROR: postinst $i do not exists or do not have execute permission." + [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i do not exists or do not have execute permission." $append_log remove_agl_pi_dir=0 fi done @@ -34,6 +40,7 @@ exec_postinst_scriptlets() { remove_agl_pi_dir=1 exec_postinst_scriptlets +systemctl daemon-reload # since all postinstalls executed successfully, remove the postinstalls directory if [ $remove_agl_pi_dir = 1 ]; then