diff --git a/mariadb.spec b/mariadb.spec index 9905e52..c200ee9 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -123,7 +123,7 @@ Name: mariadb Version: %{compatver}.%{bugfixver} -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 1 Summary: A community developed branch of MySQL @@ -1279,6 +1279,10 @@ fi %endif %changelog +* Thu May 26 2016 Jakub Dorňák - 1:10.2.0-2 +- Fix mysql-prepare-db-dir + Resolves: #1335849 + * Thu May 12 2016 Jakub Dorňák - 1:10.2.0-1 - Update to 10.2.0 diff --git a/mysql-prepare-db-dir.sh b/mysql-prepare-db-dir.sh index 1905f09..1873c1f 100644 --- a/mysql-prepare-db-dir.sh +++ b/mysql-prepare-db-dir.sh @@ -55,8 +55,8 @@ chown "$myuser:$mygroup" "$errlogfile" chmod 0640 "$errlogfile" [ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile" -# Make the data directory -if [ ! -d "$datadir/mysql" ] ; then +# Make the data directory if doesn't exist or empty +if ! ls $datadir/* &>/dev/null; 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" ]