From 417662297569663ed341aeb42bd42da525c6f8e1 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Thu, 7 Aug 2014 15:42:17 +0400 Subject: [PATCH] Run e4rat scripts only if the package is installed. --- sbin/gentoo-upgrade.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sbin/gentoo-upgrade.sh b/sbin/gentoo-upgrade.sh index 4b5e3ba..c670ee8 100755 --- a/sbin/gentoo-upgrade.sh +++ b/sbin/gentoo-upgrade.sh @@ -595,8 +595,10 @@ let STAGE_CNT++ # Enabling e4rat data collection if [ $STAGE_CNT -eq $STAGE ]; then echo "======= STAGE $STAGE: Enabling e4rat data collection =======" - e4rat_switch.sh collect - [ 0 -ne $? ] && echo "Stage $STAGE: Enabling e4rat data collection failed ;-( =======" && exit $STAGE + 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