From dac8b4cb1edb15efed4df6ed4eb615467d58a6d3 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Thu, 14 Jul 2016 19:52:12 +0200 Subject: [PATCH] Better function name for the initialization check in mysql-prepare-db-dir.sh --- mysql-prepare-db-dir.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-prepare-db-dir.sh b/mysql-prepare-db-dir.sh index ac7bc5e..ca00b13 100644 --- a/mysql-prepare-db-dir.sh +++ b/mysql-prepare-db-dir.sh @@ -17,7 +17,7 @@ ls_check_datadir () # Checks whether datadir should be initialized # @param datadir -can_initialize () +should_initialize () { case `ls_check_datadir "$1"` in ""|lost+found) true ;; @@ -76,7 +76,7 @@ chmod 0640 "$errlogfile" [ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile" # Make the data directory if doesn't exist or empty -if can_initialize "$datadir" ; then +if should_initialize "$datadir" ; then # First, make sure $datadir is there with correct permissions # (note: if it's not, and we're not root, this'll fail ...) if [ ! -e "$datadir" -a ! -h "$datadir" ]