From: Chen Qi Date: Fri, 19 Jul 2013 09:39:27 +0000 (+0800) Subject: run-postinsts: add more logging to the log file to make things clearer X-Git-Tag: rev_ivi_2015_02_04~11701 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=623bee7079e4e5a592cf304998ddb9be7b09e61f;p=scm%2Fbb%2Ftizen-distro.git run-postinsts: add more logging to the log file to make things clearer When all postinsts scripts succeed at system startup, it's very possible that the log file /var/log/postinstall.log is empty. This is kind of confusing, as that file is supposed to hold information about the postinsts. Add more logging to the log file to make things clearer. (From OE-Core rev: d60926b3fc4ba5780aef5b5226d05170892a7133) Signed-off-by: Chen Qi Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts index 2a8d1d6..c94c3e9 100755 --- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts +++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts @@ -24,6 +24,7 @@ remove_pi_dir=1 for i in `ls $pi_dir`; do i=$pi_dir/$i echo "Running postinst $i..." + [ "$POSTINST_LOGGING" = "1" ] && echo "Running postinst $i..." >> $LOGFILE if [ -x $i ]; then if [ "$POSTINST_LOGGING" = "1" ]; then sh -c $i >>$LOGFILE 2>&1 @@ -33,6 +34,7 @@ for i in `ls $pi_dir`; do rm $i else echo "ERROR: postinst $i failed." + [ "$POSTINST_LOGGING" = "1" ] && echo "ERROR: postinst $i failed." >> $LOGFILE remove_pi_dir=0 fi done