pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/databases/mariadb1011-server



Module Name:    pkgsrc
Committed By:   adam
Date:           Thu Sep 12 18:59:24 UTC 2024

Modified Files:
        pkgsrc/databases/mariadb1011-server: Makefile
        pkgsrc/databases/mariadb1011-server/files: mariadb.sh

Log Message:
mariadb1011-server: fix rc script; now it works on Darwin


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/databases/mariadb1011-server/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/databases/mariadb1011-server/files/mariadb.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/databases/mariadb1011-server/Makefile
diff -u pkgsrc/databases/mariadb1011-server/Makefile:1.15 pkgsrc/databases/mariadb1011-server/Makefile:1.16
--- pkgsrc/databases/mariadb1011-server/Makefile:1.15   Sun Aug 25 06:18:29 2024
+++ pkgsrc/databases/mariadb1011-server/Makefile        Thu Sep 12 18:59:24 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2024/08/25 06:18:29 wiz Exp $
+# $NetBSD: Makefile,v 1.16 2024/09/12 18:59:24 adam Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-server-/}
 PKGREVISION=   1
@@ -36,7 +36,7 @@ SMF_NAME=             mariadb
 SMF_METHODS=           ${RCD_SCRIPTS}
 
 CMAKE_CONFIGURE_ARGS+=         -DCONNECT_WITH_MONGO=NO
-CMAKE_CONFIGURE_ARGS+=         -DHAVE_LIBCRACK=OFF 
+CMAKE_CONFIGURE_ARGS+=         -DHAVE_LIBCRACK=OFF
 CMAKE_CONFIGURE_ARGS+=         -DWITH_SYSTEMD=no
 
 FILES_SUBST+=          HOSTNAME_CMD=${HOSTNAME_CMD:Q}

Index: pkgsrc/databases/mariadb1011-server/files/mariadb.sh
diff -u pkgsrc/databases/mariadb1011-server/files/mariadb.sh:1.1 pkgsrc/databases/mariadb1011-server/files/mariadb.sh:1.2
--- pkgsrc/databases/mariadb1011-server/files/mariadb.sh:1.1    Mon Jul 10 22:55:50 2023
+++ pkgsrc/databases/mariadb1011-server/files/mariadb.sh        Thu Sep 12 18:59:24 2024
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: mariadb.sh,v 1.1 2023/07/10 22:55:50 nia Exp $
+# $NetBSD: mariadb.sh,v 1.2 2024/09/12 18:59:24 adam Exp $
 #
 # PROVIDE: mariadb mysqld
 # REQUIRE: DAEMON LOGIN mountall
@@ -10,17 +10,20 @@
 #      mariadb_flags=""                   # additional mariadb startup flags
 #      mariadb_datadir="/path/to/datadir" # path to mariadb datadir
 
-if [ -f /etc/rc.subr ]
-then
-       . /etc/rc.subr
+if [ -f @SYSCONFBASE@/rc.subr ]; then
+  . @SYSCONFBASE@/rc.subr
 fi
 
 name="mariadb"
 rcvar=${name}
-
-load_rc_config $name
 : ${mariadb_datadir:=@MARIADB_DATADIR@}
 
+if [ -f @SYSCONFBASE@/rc.subr -a -d @SYSCONFBASE@/rc.d -a -f @SYSCONFBASE@/rc.d/DAEMON ]; then
+        load_rc_config $name
+elif [ -f @SYSCONFBASE@/rc.conf ]; then
+        . @SYSCONFBASE@/rc.conf
+fi
+
 procname="@PREFIX@/sbin/mariadbd"
 command="@PREFIX@/bin/mariadbd-safe"
 command_args="--pid-file=@VARBASE@/run/mariadb/mariadb.pid"
@@ -61,4 +64,22 @@ mariadb_prestart() {
        ulimit -n 4096
 }
 
-run_rc_command "$1"
+if [ -f @SYSCONFBASE@/rc.subr -a -d @SYSCONFBASE@/rc.d -a -f @SYSCONFBASE@/rc.d/DAEMON ]; then
+       run_rc_command "$1"
+else
+       case "$1" in
+       initdb)
+               eval ${initdb_cmd}
+               ;;
+       stop)
+               if [ -r "${pidfile}" ]; then
+                       @ECHO@ "Stopping ${name}."
+                       kill `@CAT@ ${pidfile}`
+               fi
+               ;;
+       *)
+               eval ${start_precmd}
+               eval ${command} ${command_args}
+               ;;
+       esac
+fi



Home | Main Index | Thread Index | Old Index