diff options
author | dirk <dirk@FreeBSD.org> | 2000-04-03 06:15:13 +0800 |
---|---|---|
committer | dirk <dirk@FreeBSD.org> | 2000-04-03 06:15:13 +0800 |
commit | ee03bd5f3cd37c9a41be131558535c73472e4e58 (patch) | |
tree | aa54539a09525501e03009adc3a352e86a79bfb7 /databases/percona55-server | |
parent | 483b23e28613a91fe141208b1d3689c17a502ef2 (diff) | |
download | freebsd-ports-gnome-ee03bd5f3cd37c9a41be131558535c73472e4e58.tar.gz freebsd-ports-gnome-ee03bd5f3cd37c9a41be131558535c73472e4e58.tar.zst freebsd-ports-gnome-ee03bd5f3cd37c9a41be131558535c73472e4e58.zip |
- move startup file from Makefile to files/mysql-server.sh
- check for start/stop arguments in startup file
- don't rip off --force option from mysql_install_db
Diffstat (limited to 'databases/percona55-server')
-rw-r--r-- | databases/percona55-server/Makefile | 13 | ||||
-rw-r--r-- | databases/percona55-server/files/mysql-server.sh | 18 | ||||
-rw-r--r-- | databases/percona55-server/files/patch-ab | 16 |
3 files changed, 30 insertions, 17 deletions
diff --git a/databases/percona55-server/Makefile b/databases/percona55-server/Makefile index d2f1f968ddc7..15b2deb514e3 100644 --- a/databases/percona55-server/Makefile +++ b/databases/percona55-server/Makefile @@ -34,6 +34,7 @@ CONFIGURE_ENV+= PERL=${PERL} \ INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ CONFIGURE_ARGS="${CONFIGURE_ARGS}" +# MySQL-Server part .if !defined(CLIENT_ONLY) RUN_DEPENDS= mysql:${PORTSDIR}/databases/mysql322-client @@ -117,13 +118,7 @@ post-install: ${PREFIX}/bin/mysql_install_db @${SETENV} DB_DIR=${DB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif - @${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/mysql-server.sh - @${ECHO} "#" >> ${PREFIX}/etc/rc.d/mysql-server.sh - @${ECHO} "" >> ${PREFIX}/etc/rc.d/mysql-server.sh - @${ECHO} "if [ -x ${PREFIX}/bin/safe_mysqld ]" >> ${PREFIX}/etc/rc.d/mysql-server.sh - @${ECHO} "then" >> ${PREFIX}/etc/rc.d/mysql-server.sh - @${ECHO} " ${PREFIX}/bin/safe_mysqld --user=mysql > /dev/null & && ${ECHO} -n ' mysql'" >> ${PREFIX}/etc/rc.d/mysql-server.sh - @${ECHO} "fi" >> ${PREFIX}/etc/rc.d/mysql-server.sh + @${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/mysql-server.sh > ${PREFIX}/etc/rc.d/mysql-server.sh @${CHMOD} 750 ${PREFIX}/etc/rc.d/mysql-server.sh .if !defined(NOPORTDOCS) @@ -137,6 +132,8 @@ post-install: .endif .include <bsd.port.post.mk> + +# MySQL-Client part .else MAN1= mysql.1 @@ -145,7 +142,7 @@ MAKE_ENV= CLIENT_ONLY="${CLIENT_ONLY}" post-install: @${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/mysql-client.sh - @${ECHO} "#" >> ${PREFIX}/etc/rc.d/mysql-client.sh + @${ECHO} "" >> ${PREFIX}/etc/rc.d/mysql-client.sh @${ECHO} "${LDCONFIG} -m ${PREFIX}/lib/mysql" >> ${PREFIX}/etc/rc.d/mysql-client.sh @${CHMOD} 750 ${PREFIX}/etc/rc.d/mysql-client.sh diff --git a/databases/percona55-server/files/mysql-server.sh b/databases/percona55-server/files/mysql-server.sh new file mode 100644 index 000000000000..507a080ec911 --- /dev/null +++ b/databases/percona55-server/files/mysql-server.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +case "$1" in + start) + if [ -x %%PREFIX%%/bin/safe_mysqld ]; then + %%PREFIX%%/bin/safe_mysqld --user=mysql > /dev/null & && echo -n ' mysqld' + fi + ;; + stop) + /usr/bin/killall mysqld > /dev/null 2>&1 && echo -n ' mysqld' + ;; + *) + echo "" + echo "Usage: `basename $0` { start | stop }" + echo "" + exit 1 + ;; +esac diff --git a/databases/percona55-server/files/patch-ab b/databases/percona55-server/files/patch-ab index 04825c3dc4b1..1fd66bbe0cad 100644 --- a/databases/percona55-server/files/patch-ab +++ b/databases/percona55-server/files/patch-ab @@ -1,17 +1,15 @@ ---- scripts/mysql_install_db.sh.orig Sat Aug 28 13:10:54 1999 -+++ scripts/mysql_install_db.sh Mon Sep 13 00:13:04 1999 -@@ -15,10 +15,6 @@ +--- scripts/mysql_install_db.sh.orig Wed Jan 12 21:06:30 2000 ++++ scripts/mysql_install_db.sh Sun Mar 26 23:20:27 2000 +@@ -15,8 +15,6 @@ force=0 IN_RPM=0 -# Are we doing an rpm install? -if test "$1" = "-IN-RPM"; then IN_RPM=1; shift; fi --if test "$1" = "--force"; then force=1; shift; fi -- + if test "$1" = "--force"; then force=1; shift; fi + # Get mysqld/safe_mysqld options from /etc/my.cnf or ~/.my.cnf - if test -w / - then -@@ -60,8 +56,6 @@ +@@ -60,8 +58,6 @@ fi fi @@ -20,7 +18,7 @@ hostname=`hostname` # Install this too in the user table # Check if hostname is valid -@@ -255,12 +249,6 @@ +@@ -255,12 +251,6 @@ END_OF_DATA then echo "" |