[csw-devel] SF.net SVN: gar:[12143] csw/mgar/pkg/mysql5/branches/mysql-5.0.x

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Jan 2 01:48:02 CET 2011


Revision: 12143
          http://gar.svn.sourceforge.net/gar/?rev=12143&view=rev
Author:   wahwah
Date:     2011-01-02 00:48:02 +0000 (Sun, 02 Jan 2011)

Log Message:
-----------
mysql-5.0.x: Using /etc/opt/csw for configuration

Modified Paths:
--------------
    csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile
    csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/CSWmysql5.postinstall
    csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/quick_start-csw

Modified: csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile	2011-01-01 18:18:23 UTC (rev 12142)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile	2011-01-02 00:48:02 UTC (rev 12143)
@@ -27,8 +27,8 @@
 
 # Change prefix to /opt/csw/$(NAME)
 prefix = /opt/csw/$(NAME)
-localstatedir = /var/opt/csw/$(NAME)
-sysconfdir = /etc/opt/csw/$(NAME)
+localstatedir = /var$(prefix)
+sysconfdir = /etc$(prefix)
 
 # Where to put the init script
 global_sysconfdir = /etc/opt/csw
@@ -243,4 +243,5 @@
 	# http://www.opencsw.org/bugtrack/view.php?id=4149
 	ginstall -m 755 -d $(PKGROOT)/opt/csw/lib
 	gln -s ../mysql5/lib/mysql $(PKGROOT)/opt/csw/lib/mysql 
+	ginstall -m 755 -d $(PKGROOT)$(sysconfdir)
 	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/CSWmysql5.postinstall
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/CSWmysql5.postinstall	2011-01-01 18:18:23 UTC (rev 12142)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/CSWmysql5.postinstall	2011-01-02 00:48:02 UTC (rev 12143)
@@ -8,11 +8,11 @@
 # This script creates a default database with the small-memory footprint.
 # Input may be provided for DATADIR and DEFAULTS_FILE
 #
-MYSQL_HOME="/opt/csw/mysql5"
-MYSQL_VAR="/var/opt/csw/mysql5"
-sysconfdir="/etc/opt/csw/mysql5"
+prefix="/opt/csw/mysql5"
+MYSQL_HOME="${prefix}"
+MYSQL_VAR="/var${prefix}"
+sysconfdir="/etc${prefix}"
 # https://www.opencsw.org/mantis/view.php?id=4646
-WRONG_LOCATION_DEFAULTS_FILES="${MYSQL_VAR}/my.cnf"
 DEFAULTS_FILE="${sysconfdir}/my.cnf"
 MYSQLD_USER="mysql"
 # Provide the default data directory

Modified: csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/quick_start-csw
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/quick_start-csw	2011-01-01 18:18:23 UTC (rev 12142)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/quick_start-csw	2011-01-02 00:48:02 UTC (rev 12143)
@@ -10,10 +10,11 @@
 #
 # TODO: This file should be integrated with CSWmysql5.postinstall file.
 
-BASEDIR=/opt/csw/mysql5
-MYSQL_VAR=/var/opt/csw/mysql5
-DEFAULTS_FILE=$BASEDIR/my.cnf
-SAVE_DEFAULTS_FILE=$MYSQL_VAR/my.cnf
+prefix=/opt/csw/mysql5
+MYSQL_HOME=${prefix}
+MYSQL_VAR=/var${prefix}
+sysconfdir=/etc${prefix}
+DEFAULTS_FILE=${sysconfdir}/my.cnf
 MYSQLD_USER=mysql
 #
 # Provide a default data directory
@@ -23,7 +24,7 @@
 echo  "This is the start script to setup a MySQL-5 database"
 echo  "  directory."
 echo
-echo  "  The base directory is $BASEDIR."
+echo  "  The base directory is $MYSQL_HOME."
 echo  "  The default database directory is $MYSQLD_DATADIR."
 echo
 echo  "  If you have not setup a partition for the database and"
@@ -53,7 +54,7 @@
     ` || exit $?
 if [ $usrin = "[default]" ]; then
     if [ ! -f "$DEFAULTS_FILE" ]; then
-        IN_DEFAULTS_FILE=$BASEDIR/share/mysql/my-small.cnf
+        IN_DEFAULTS_FILE=$MYSQL_HOME/share/mysql/my-small.cnf
         echo "Using $IN_DEFAULTS_FILE to create the options file."
     else
         IN_DEFAULTS_FILE=$DEFAULTS_FILE
@@ -104,10 +105,10 @@
 echo "Creating MySQL core database in $MYSQLD_DATADIR"
 echo
 echo "###  The following messages are from mysql_install_db."
-$BASEDIR/bin/mysql_install_db \
+$MYSQL_HOME/bin/mysql_install_db \
     --defaults-extra-file=$DEFAULTS_FILE \
     --user=$MYSQLD_USER \
-    --basedir=$BASEDIR \
+    --basedir=$MYSQL_HOME \
     --datadir=$MYSQLD_DATADIR
 
 #


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list