[debian-mysql] mysql-server init.d/mysql patch

grubert at users.sourceforge.net grubert at users.sourceforge.net
Fri Feb 8 17:59:22 UTC 2008


sorry to file it this way, but i got lost in the web and could not find 
the patch upload.

in init.d/mysql CONF=/etc/mysql/my.cnf ist declared but not used
for params retrieval and mysql_safe call.

also using $0 instead of /etc/init.d/mysql in the message seams preferable 
to me.

(i stumbled over this when i tried to start a second server under an other 
user)

cheers

-- 
-------------- next part --------------
diff -u -r mysql-dfsg-5.0-5.0.32/debian/mysql-server-5.0.mysql.init mysql-dfsg-5.0-5.0.32-patch/debian/mysql-server-5.0.mysql.init
--- mysql-dfsg-5.0-5.0.32/debian/mysql-server-5.0.mysql.init	2008-02-08 18:16:54.000000000 +0100
+++ mysql-dfsg-5.0-5.0.32-patch/debian/mysql-server-5.0.mysql.init	2008-02-08 18:25:00.000000000 +0100
@@ -26,7 +26,7 @@
 MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
 
 # priority can be overriden and "-s" adds output to stderr
-ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i"
+ERR_LOGGER="logger -p daemon.err -t $0 -i"
 
 # Safeguard (relative paths, core dumps..)
 cd /
@@ -41,7 +41,7 @@
 #
 # Usage: void mysqld_get_param option
 mysqld_get_param() {
-	/usr/sbin/mysqld --print-defaults \
+	/usr/sbin/mysqld --defaults-file=$CONF --print-defaults \
 		| tr " " "\n" \
 		| grep -- "--$1" \
 		| tail -n 1 \
@@ -51,9 +51,9 @@
 ## Do some sanity checks before even trying to start mysqld.
 sanity_checks() {
   # check for config file
-  if [ ! -r /etc/mysql/my.cnf ]; then
-    log_warning_msg "$0: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz"
-    echo                "WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" | $ERR_LOGGER
+  if [ ! -r $CONF ]; then
+    log_warning_msg "$0: WARNING: $CONF cannot be read. See README.Debian.gz"
+    echo                "WARNING: $CONF cannot be read. See README.Debian.gz" | $ERR_LOGGER
   fi
 
   # check for buggy options
@@ -109,7 +109,7 @@
 	   log_progress_msg "already running"
 	   log_end_msg 0
 	else
-  	    /usr/bin/mysqld_safe > /dev/null 2>&1 &
+  	    /usr/bin/mysqld_safe --defaults-file=$CONF > /dev/null 2>&1 &
 	    # 6s was reported in #352070 to be too few when using ndbcluster
 	    for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do
                 sleep 1


More information about the pkg-mysql-maint mailing list