run-postinsts : Fix script execution issue "Invalid argument" 39/42139/2
authorBaptiste DURAND <baptiste.durand@gmail.com>
Thu, 4 Jun 2015 09:08:26 +0000 (11:08 +0200)
committerStéphane Desneux (sdx) <stephane.desneux@open.eurogiciel.org>
Fri, 26 Jun 2015 10:01:21 +0000 (03:01 -0700)
log extract :
/usr/sbin/run-postinsts: line 57: /var/log/postinstall.log: Invalid argument

Change-Id: If5f75f9fcdf8a9fe83ef5fe61acb38df0a0b16ef
Signed-off-by: Baptiste DURAND <baptiste.durand@gmail.com>
meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts

index f547a7b..eb38395 100755 (executable)
@@ -54,13 +54,13 @@ exec_postinst_scriptlets() {
        for i in `ls $pi_dir`; do
                i=$pi_dir/$i
                echo "Running postinst $i..."
-               [ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log
+               [ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." \$append_log
                if [ -x $i ]; then
-                       eval sh -c $i $append_log
+                       eval sh -c $i \$append_log
                        rm $i
                else
                        echo "ERROR: postinst $i failed."
-                       [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i failed." $append_log
+                       [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i failed." \$append_log
                        remove_pi_dir=0
                fi
        done
@@ -70,11 +70,11 @@ remove_pi_dir=1
 if $pm_installed; then
        case $pm in
                "ipk")
-                       eval opkg-cl configure $append_log
+                       eval opkg-cl configure \$append_log
                        ;;
 
                "deb")
-                       eval dpkg --configure -a $append_log
+                       eval dpkg --configure -a \$append_log
                        ;;
        esac
 else