summaryrefslogtreecommitdiff
path: root/support-files/mysql.spec.sh
diff options
context:
space:
mode:
authorBalasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>2013-03-05 16:16:34 +0100
committerBalasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>2013-03-05 16:16:34 +0100
commit8ac9ee0801ccfa5b4a8da7da1d4c8212dd137ab6 (patch)
treea5cc5254309104ad4c1b13ba7168fbcf0168cc05 /support-files/mysql.spec.sh
parent429e589256ac48f8b195360d858e7bbd1a3023e8 (diff)
downloadmariadb-git-8ac9ee0801ccfa5b4a8da7da1d4c8212dd137ab6.tar.gz
Updated Code for Bug#16235828
Diffstat (limited to 'support-files/mysql.spec.sh')
-rw-r--r--support-files/mysql.spec.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 226ff5d0dfc..b64796fa4ea 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -716,13 +716,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` | \
+ 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
+ echo >> $STATUS_FILE
+ fi
if [ -n "$SERVER_TO_START" ] ; then
# There is only one PID file, race possibility ignored