Run e4rat scripts only if the package is installed.

This commit is contained in:
Kolan Sh 2014-08-07 15:42:17 +04:00
parent 8e2bb4c5e2
commit 4176622975
1 changed files with 4 additions and 2 deletions

View File

@ -595,8 +595,10 @@ let STAGE_CNT++
# Enabling e4rat data collection
if [ $STAGE_CNT -eq $STAGE ]; then
echo "======= STAGE $STAGE: Enabling e4rat data collection ======="
if [ `which e4rat-collect 2>/dev/null` ]; then
e4rat_switch.sh collect
[ 0 -ne $? ] && echo "Stage $STAGE: Enabling e4rat data collection failed ;-( =======" && exit $STAGE
fi
let STAGE++
fi