summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
authorBalasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>2013-05-07 09:14:51 +0200
committerBalasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>2013-05-07 09:14:51 +0200
commitded5a79dab46569c89044226ce590f6c3f9b7d21 (patch)
tree72f8bac33fde433cc63385a8dc4f711e72f4500f /support-files
parentbe8f5a6b5c46480719af0fd12e27338e883a06cb (diff)
downloadmariadb-git-ded5a79dab46569c89044226ce590f6c3f9b7d21.tar.gz
Updated spec file to ignore upgrade error message
Diffstat (limited to 'support-files')
-rw-r--r--support-files/mysql.spec.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 115a1380e32..2d8aa78464b 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -753,13 +753,16 @@ if [ -d $mysql_datadir ] ; then
echo "MySQL RPM upgrade to version $NEW_VERSION" > $STATUS_FILE
echo "'pre' step running at `date`" >> $STATUS_FILE
echo >> $STATUS_FILE
- echo "ERR file(s):" >> $STATUS_FILE
- ls -ltr $mysql_datadir/*.err >> $STATUS_FILE
- echo >> $STATUS_FILE
- echo "Latest 'Version' line in latest file:" >> $STATUS_FILE
- grep '^Version' `ls -tr $mysql_datadir/*.err | tail -1` | \
- tail -1 >> $STATUS_FILE
- echo >> $STATUS_FILE
+ fcount=`ls -ltr $mysql_datadir/*.err 2>/dev/null | wc -l`
+ if [ $fcount -gt 0 ] ; then
+ echo "ERR file(s):" >> $STATUS_FILE
+ ls -ltr $mysql_datadir/*.err >> $STATUS_FILE
+ echo >> $STATUS_FILE
+ echo "Latest 'Version' line in latest file:" >> $STATUS_FILE
+ grep '^Version' `ls -tr $mysql_datadir/*.err | tail -1` | \
+ tail -1 >> $STATUS_FILE
+ echo >> $STATUS_FILE
+ fi
if [ -n "$SERVER_TO_START" ] ; then
# There is only one PID file, race possibility ignored