aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--databases/mysql322-server/Makefile13
-rw-r--r--databases/mysql322-server/files/mysql-server.sh18
-rw-r--r--databases/mysql322-server/files/patch-ab16
-rw-r--r--databases/mysql323-server/Makefile13
-rw-r--r--databases/mysql323-server/files/mysql-server.sh18
-rw-r--r--databases/mysql323-server/files/patch-ab16
-rw-r--r--databases/mysql40-server/Makefile13
-rw-r--r--databases/mysql40-server/files/mysql-server.sh18
-rw-r--r--databases/mysql40-server/files/patch-ab16
-rw-r--r--databases/mysql41-server/Makefile13
-rw-r--r--databases/mysql41-server/files/mysql-server.sh18
-rw-r--r--databases/mysql41-server/files/patch-ab16
-rw-r--r--databases/mysql50-server/Makefile13
-rw-r--r--databases/mysql50-server/files/mysql-server.sh18
-rw-r--r--databases/mysql50-server/files/patch-ab16
-rw-r--r--databases/mysql51-server/Makefile13
-rw-r--r--databases/mysql51-server/files/mysql-server.sh18
-rw-r--r--databases/mysql51-server/files/patch-ab16
-rw-r--r--databases/mysql54-server/Makefile13
-rw-r--r--databases/mysql54-server/files/mysql-server.sh18
-rw-r--r--databases/mysql54-server/files/patch-ab16
-rw-r--r--databases/mysql55-server/Makefile13
-rw-r--r--databases/mysql55-server/files/mysql-server.sh18
-rw-r--r--databases/mysql55-server/files/patch-ab16
-rw-r--r--databases/mysql60-server/Makefile13
-rw-r--r--databases/mysql60-server/files/mysql-server.sh18
-rw-r--r--databases/mysql60-server/files/patch-ab16
-rw-r--r--databases/percona55-server/Makefile13
-rw-r--r--databases/percona55-server/files/mysql-server.sh18
-rw-r--r--databases/percona55-server/files/patch-ab16
30 files changed, 300 insertions, 170 deletions
diff --git a/databases/mysql322-server/Makefile b/databases/mysql322-server/Makefile
index d2f1f968ddc7..15b2deb514e3 100644
--- a/databases/mysql322-server/Makefile
+++ b/databases/mysql322-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/mysql322-server/files/mysql-server.sh b/databases/mysql322-server/files/mysql-server.sh
new file mode 100644
index 000000000000..507a080ec911
--- /dev/null
+++ b/databases/mysql322-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/mysql322-server/files/patch-ab b/databases/mysql322-server/files/patch-ab
index 04825c3dc4b1..1fd66bbe0cad 100644
--- a/databases/mysql322-server/files/patch-ab
+++ b/databases/mysql322-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 ""
diff --git a/databases/mysql323-server/Makefile b/databases/mysql323-server/Makefile
index d2f1f968ddc7..15b2deb514e3 100644
--- a/databases/mysql323-server/Makefile
+++ b/databases/mysql323-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/mysql323-server/files/mysql-server.sh b/databases/mysql323-server/files/mysql-server.sh
new file mode 100644
index 000000000000..507a080ec911
--- /dev/null
+++ b/databases/mysql323-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/mysql323-server/files/patch-ab b/databases/mysql323-server/files/patch-ab
index 04825c3dc4b1..1fd66bbe0cad 100644
--- a/databases/mysql323-server/files/patch-ab
+++ b/databases/mysql323-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 ""
diff --git a/databases/mysql40-server/Makefile b/databases/mysql40-server/Makefile
index d2f1f968ddc7..15b2deb514e3 100644
--- a/databases/mysql40-server/Makefile
+++ b/databases/mysql40-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/mysql40-server/files/mysql-server.sh b/databases/mysql40-server/files/mysql-server.sh
new file mode 100644
index 000000000000..507a080ec911
--- /dev/null
+++ b/databases/mysql40-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/mysql40-server/files/patch-ab b/databases/mysql40-server/files/patch-ab
index 04825c3dc4b1..1fd66bbe0cad 100644
--- a/databases/mysql40-server/files/patch-ab
+++ b/databases/mysql40-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 ""
diff --git a/databases/mysql41-server/Makefile b/databases/mysql41-server/Makefile
index d2f1f968ddc7..15b2deb514e3 100644
--- a/databases/mysql41-server/Makefile
+++ b/databases/mysql41-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/mysql41-server/files/mysql-server.sh b/databases/mysql41-server/files/mysql-server.sh
new file mode 100644
index 000000000000..507a080ec911
--- /dev/null
+++ b/databases/mysql41-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/mysql41-server/files/patch-ab b/databases/mysql41-server/files/patch-ab
index 04825c3dc4b1..1fd66bbe0cad 100644
--- a/databases/mysql41-server/files/patch-ab
+++ b/databases/mysql41-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 ""
diff --git a/databases/mysql50-server/Makefile b/databases/mysql50-server/Makefile
index d2f1f968ddc7..15b2deb514e3 100644
--- a/databases/mysql50-server/Makefile
+++ b/databases/mysql50-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/mysql50-server/files/mysql-server.sh b/databases/mysql50-server/files/mysql-server.sh
new file mode 100644
index 000000000000..507a080ec911
--- /dev/null
+++ b/databases/mysql50-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/mysql50-server/files/patch-ab b/databases/mysql50-server/files/patch-ab
index 04825c3dc4b1..1fd66bbe0cad 100644
--- a/databases/mysql50-server/files/patch-ab
+++ b/databases/mysql50-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 ""
diff --git a/databases/mysql51-server/Makefile b/databases/mysql51-server/Makefile
index d2f1f968ddc7..15b2deb514e3 100644
--- a/databases/mysql51-server/Makefile
+++ b/databases/mysql51-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/mysql51-server/files/mysql-server.sh b/databases/mysql51-server/files/mysql-server.sh
new file mode 100644
index 000000000000..507a080ec911
--- /dev/null
+++ b/databases/mysql51-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/mysql51-server/files/patch-ab b/databases/mysql51-server/files/patch-ab
index 04825c3dc4b1..1fd66bbe0cad 100644
--- a/databases/mysql51-server/files/patch-ab
+++ b/databases/mysql51-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 ""
diff --git a/databases/mysql54-server/Makefile b/databases/mysql54-server/Makefile
index d2f1f968ddc7..15b2deb514e3 100644
--- a/databases/mysql54-server/Makefile
+++ b/databases/mysql54-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/mysql54-server/files/mysql-server.sh b/databases/mysql54-server/files/mysql-server.sh
new file mode 100644
index 000000000000..507a080ec911
--- /dev/null
+++ b/databases/mysql54-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/mysql54-server/files/patch-ab b/databases/mysql54-server/files/patch-ab
index 04825c3dc4b1..1fd66bbe0cad 100644
--- a/databases/mysql54-server/files/patch-ab
+++ b/databases/mysql54-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 ""
diff --git a/databases/mysql55-server/Makefile b/databases/mysql55-server/Makefile
index d2f1f968ddc7..15b2deb514e3 100644
--- a/databases/mysql55-server/Makefile
+++ b/databases/mysql55-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/mysql55-server/files/mysql-server.sh b/databases/mysql55-server/files/mysql-server.sh
new file mode 100644
index 000000000000..507a080ec911
--- /dev/null
+++ b/databases/mysql55-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/mysql55-server/files/patch-ab b/databases/mysql55-server/files/patch-ab
index 04825c3dc4b1..1fd66bbe0cad 100644
--- a/databases/mysql55-server/files/patch-ab
+++ b/databases/mysql55-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 ""
diff --git a/databases/mysql60-server/Makefile b/databases/mysql60-server/Makefile
index d2f1f968ddc7..15b2deb514e3 100644
--- a/databases/mysql60-server/Makefile
+++ b/databases/mysql60-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/mysql60-server/files/mysql-server.sh b/databases/mysql60-server/files/mysql-server.sh
new file mode 100644
index 000000000000..507a080ec911
--- /dev/null
+++ b/databases/mysql60-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/mysql60-server/files/patch-ab b/databases/mysql60-server/files/patch-ab
index 04825c3dc4b1..1fd66bbe0cad 100644
--- a/databases/mysql60-server/files/patch-ab
+++ b/databases/mysql60-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 ""
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 ""