tags 604233 + pending thanks Dear maintainer,
I've prepared an NMU for sitebar (versioned as 3.3.9-2.2) and uploaded it to DELAYED/2. Please feel free to tell me if I should delay it longer. Regards. diff -u sitebar-3.3.9/debian/changelog sitebar-3.3.9/debian/changelog --- sitebar-3.3.9/debian/changelog +++ sitebar-3.3.9/debian/changelog @@ -1,3 +1,13 @@ +sitebar (3.3.9-2.2) unstable; urgency=low + + * Non-maintainer upload. + * debian/postinst: Use the mysql-server status interface and the policy + invoke-rc.d mechanism to launch the mysql server. Also check the existance + of /usr/bin/mysqld_safe instead of /usr/sbin/mysql (from the system server + package). Closes: #604233 + + -- Didier Raboud <did...@raboud.com> Tue, 30 Nov 2010 12:28:12 +0100 + sitebar (3.3.9-2.1) unstable; urgency=low * Non-maintainer upload. diff -u sitebar-3.3.9/debian/postinst sitebar-3.3.9/debian/postinst --- sitebar-3.3.9/debian/postinst +++ sitebar-3.3.9/debian/postinst @@ -28,14 +28,11 @@ } # check to see if mysql is running, start if not -if [ -f /usr/sbin/mysqld ] ; then - mysqld_get_param() { - mysqld --print-defaults | tr " " "\n" | grep -- "--$1" | tail -n 1 | cut -d= -f2 - } - pidfile=`mysqld_get_param pid-file` - ps_alive=0 - if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi - if [ $ps_alive = 0 ]; then mysqld_safe > /dev/null 2>&1 & fi +if [ -f /usr/bin/mysqld_safe -a -f /etc/init.d/mysql ] ; then + /etc/init.d/mysql status > /dev/null + if [ $? != 0 ]; then + invoke-rc.d mysql start + fi fi case "$1" in @@ -75,11 +72,9 @@ # setup the db - if [ -f /usr/sbin/mysqld ] ; then - pidfile=`mysqld_get_param pid-file` - ps_alive=0 - if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi - if [ $ps_alive = 1 ]; then + if [ -f /usr/bin/mysqld_safe -a -f /etc/init.d/mysql ] ; then + /etc/init.d/mysql status > /dev/null + if [ $? = 0 ]; then db_get "sitebar/db_initialized" dbinitialized="$RET" || true db_get "sitebar/skipdb"
signature.asc
Description: This is a digitally signed message part.