| #!/bin/sh |
| |
| |
| |
| |
| export LC_ALL=C |
| |
| |
| |
| |
| |
| |
| get_mysql_option(){ |
| if [ $# -ne 3 ] ; then |
| echo "get_mysql_option requires 3 arguments: section option default_value" |
| return |
| fi |
| sections="$1" |
| option_name="$2" |
| default_value="$3" |
| result=`@bindir@/my_print_defaults $my_print_defaults_extra_args $sections | sed -n "s/^--${option_name}=//p" | tail -n 1` |
| if [ -z "$result" ]; then |
| |
| result="${default_value}" |
| fi |
| } |
| |
| |
| |
| |
| |
| my_print_defaults_extra_args='' |
| while echo "$1" | grep -q '^--defaults' ; do |
| my_print_defaults_extra_args="${my_print_defaults_extra_args} $1" |
| shift |
| done |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| server_sections="mysqld_safe mysqld server mysqld-@MAJOR_VERSION@.@MINOR_VERSION@ mariadb mariadb-@MAJOR_VERSION@.@MINOR_VERSION@ client-server" |
| |
| get_mysql_option "$server_sections" datadir "@MYSQL_DATADIR@" |
| datadir="$result" |
| |
| |
| |
| |
| |
| get_mysql_option "$server_sections" log-error "$datadir/`uname -n`.err" |
| errlogfile="$result" |
| |
| get_mysql_option "$server_sections" socket "@MYSQL_UNIX_ADDR@" |
| socketfile="$result" |
| |
| get_mysql_option "$server_sections" pid-file "$datadir/`uname -n`.pid" |
| pidfile="$result" |
| |