X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=recipes-devtools%2Frun-agl-postinsts%2Frun-agl-postinsts%2Frun-agl-postinsts;fp=recipes-devtools%2Frun-agl-postinsts%2Frun-agl-postinsts%2Frun-agl-postinsts;h=0000000000000000000000000000000000000000;hb=1b72a0f90fa7d1b45eb1017629cc83dcd8971c48;hp=1d1a5a0592aed1eb8e98543ddbef32cd0719aaa2;hpb=94a051785cdb588bc3a475a5490f1f286176d646;p=AGL%2Fmeta-agl-demo.git diff --git a/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts b/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts deleted file mode 100755 index 1d1a5a059..000000000 --- a/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# Copyright 2017 IoT.bzh. - -# Author: Ronan Le Martret -# - -# The following script will run all the scriptlets found in #SYSCONFDIR#/agl-postinsts. - -agl_pi_dir="#SYSCONFDIR#/agl-postinsts" - -POSTINST_LOGGING=1 -LOGFILE=/var/log/agl-postinstall.log - -[ -e $LOGFILE ] && mv ${LOGFILE} ${LOGFILE}.old.$(date +%F--%H%M.%S) - -append_log=">>$LOGFILE 2>&1" - -exec_postinst_scriptlets() { - for i in `ls $agl_pi_dir`; do - i=$agl_pi_dir/$i - echo "Running postinst $i..." - [ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log - if [ -x $i ]; then - eval sh -c $i $append_log - 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 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 -} - -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 - rm -rf $agl_pi_dir -fi