pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/databases/mariadb104-server mariadb104-server: do init...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8fed0bda19be
branches: trunk
changeset: 452480:8fed0bda19be
user: nia <nia%pkgsrc.org@localhost>
date: Tue May 11 17:26:50 2021 +0000
description:
mariadb104-server: do initdb automatically on start
suggested by abs
diffstat:
databases/mariadb104-server/Makefile | 4 ++--
databases/mariadb104-server/files/mariadb.sh | 7 +++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diffs (43 lines):
diff -r da6f5d5a7b2e -r 8fed0bda19be databases/mariadb104-server/Makefile
--- a/databases/mariadb104-server/Makefile Tue May 11 17:03:24 2021 +0000
+++ b/databases/mariadb104-server/Makefile Tue May 11 17:26:50 2021 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2021/05/10 14:15:55 nia Exp $
+# $NetBSD: Makefile,v 1.3 2021/05/11 17:26:50 nia Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
-PKGREVISION= 1
+PKGREVISION= 2
COMMENT= MariaDB 10.4, a free SQL database (server)
CONFLICTS= mysql-server-[0-9]*
diff -r da6f5d5a7b2e -r 8fed0bda19be databases/mariadb104-server/files/mariadb.sh
--- a/databases/mariadb104-server/files/mariadb.sh Tue May 11 17:03:24 2021 +0000
+++ b/databases/mariadb104-server/files/mariadb.sh Tue May 11 17:26:50 2021 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: mariadb.sh,v 1.1 2021/05/08 19:47:16 jdolecek Exp $
+# $NetBSD: mariadb.sh,v 1.2 2021/05/11 17:26:50 nia Exp $
#
# PROVIDE: mariadb mysqld
# REQUIRE: DAEMON LOGIN mountall
@@ -26,7 +26,7 @@
pidfile="@VARBASE@/run/mariadb/mariadb.pid"
mariadb_initdb() {
- if [ -f @MARIADB_DATADIR@/mysql/host.frm ]; then
+ if [ -f @MARIADB_DATADIR@/mysql/user.frm ]; then
echo "The MariaDB database has already been initialized."
echo "Skipping database initialization."
else
@@ -43,6 +43,9 @@
}
mariadb_prestart() {
+ if ! [ -f @MARIADB_DATADIR@/mysql/user.frm ]; then
+ mariadb_initdb
+ fi
ulimit -n 4096
}
Home |
Main Index |
Thread Index |
Old Index