From: jow Date: Tue, 14 Dec 2010 13:59:47 +0000 (+0000) Subject: [packages] mysql: fix initscript X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;h=54e6a20a2a87569cc6bfa33f3e5f159a44b8584e;p=packages.git [packages] mysql: fix initscript git-svn-id: svn://svn.openwrt.org/openwrt/packages@24565 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/libs/mysql/files/mysqld.init b/libs/mysql/files/mysqld.init index d3edd1521..e3088a342 100644 --- a/libs/mysql/files/mysqld.init +++ b/libs/mysql/files/mysqld.init @@ -13,21 +13,15 @@ start() { echo "Error: datadir in /etc/my.cnf ($DATADIR) doesn't exist" return 1 elif [ ! -f $DATADIR/mysql/tables_priv.MYD ]; then - echo "Error: I didn't detect a privileges table, you might need to run mysql_install_db --force to initialize the system tables" - return 1 + echo "Error: I didn't detect a privileges table, you might need to run mysql_install_db --force to initialize the system tables" + return 1 else - start-stop-daemon -x $CMD -p $PID -b -m -S + start-stop-daemon -x $CMD -b -S -- --pid-file=$PID fi } stop() { echo -n "Stopping Mysqld..." - start-stop-daemon -x $CMD -p $PID -K - ret=$? - if [ -f "$PID" ]; then - rm "$PID" - fi - return ${ret} + service_kill ${CMD##*/} $PID + echo "done" } - -