--- sitebar.postinst_orig 2009-05-02 20:36:16.000000000 -0400 +++ sitebar.postinst 2012-01-31 16:43:45.000000000 -0500 @@ -76,10 +76,11 @@ # 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 service mysql status | grep -q "/running" ; then ps_alive=1; fi + if [ $ps_alive = 0 ]; then + echo "Error: local MySQL server not running, skipping database initialization...." + else db_get "sitebar/db_initialized" dbinitialized="$RET" || true db_get "sitebar/skipdb"