1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2010-2011 OpenWrt.org
12 echo "${initscript}:" "$@" 1>&2
16 local datadir
=$
(sed -n -e "s/^[[:space:]]*datadir[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" /etc
/my.cnf
)
17 if [ ! -d "$datadir" ]; then
18 error
"Error: datadir '$datadir' in /etc/my.cnf doesn't exist"
21 if [ ! -f "$datadir/mysql/tables_priv.MYD" ]; then
22 error
"Error: I didn't detect a privileges table, you might need to run mysql_install_db --force to initialize the system tables"
25 service_start
/usr
/bin
/mysqld
29 service_stop
/usr
/bin
/mysqld