tags 583648 + pending
thanks

Dear maintainer,

I've prepared an NMU for zoneminder (versioned as 1.24.2-4.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards.

-- 
 .''`.   http://info.comodo.priv.at/ -- GPG key IDs: 0x8649AA06, 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
   `-    NP: Queen: Under Pressure
diff -u zoneminder-1.24.2/debian/changelog zoneminder-1.24.2/debian/changelog
--- zoneminder-1.24.2/debian/changelog
+++ zoneminder-1.24.2/debian/changelog
@@ -1,3 +1,12 @@
+zoneminder (1.24.2-4.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "package removed, processes still running": apply patch to
+    debian/postinst by Vagrant Cascadian: use invoke-rc.d and run
+    mysql-related actions only when mysql is running (closes: #583648).
+
+ -- gregor herrmann <gre...@debian.org>  Thu, 01 Jul 2010 19:47:10 +0200
+
 zoneminder (1.24.2-4) unstable; urgency=high
   * Update init.d to list mysql dependency
     (closes: #583505)
diff -u zoneminder-1.24.2/debian/postinst zoneminder-1.24.2/debian/postinst
--- zoneminder-1.24.2/debian/postinst
+++ zoneminder-1.24.2/debian/postinst
@@ -10,21 +10,29 @@
 		# Get mysql started if it isn't
 		#
 		if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then
-			/etc/init.d/mysql start
+			invoke-rc.d mysql start
+		fi
+		if $(/etc/init.d/mysql status >/dev/null 2>&1); then
+			mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
+			cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
+			echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
+		else
+			echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
 		fi
-		mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
-		cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
-		echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
 		chown www-data:www-data /var/log/zm
 		chown www-data:www-data /var/lib/zm/
 		chown www-data:www-data -R /var/cache/zoneminder
     else
-        echo 'grant lock tables, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
 		chown www-data:www-data /var/log/zm
-        OLD_ZM_VERSION=${2%-*}
-        if [ "$OLD_ZM_VERSION" != "$VERSION" ] ; then
-            zmupdate.pl --version $OLD_ZM_VERSION 
-        fi
+		if $(/etc/init.d/mysql status >/dev/null 2>&1); then
+	        echo 'grant lock tables, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
+            OLD_ZM_VERSION=${2%-*}
+            if [ "$OLD_ZM_VERSION" != "$VERSION" ] ; then
+                zmupdate.pl --version $OLD_ZM_VERSION 
+            fi
+		else
+			echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
+		fi
 	fi
 fi
 #DEBHELPER#

Attachment: signature.asc
Description: Digital signature

Reply via email to