File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,16 @@ if [ "${1:0:1}" = '-' ]; then
7
7
fi
8
8
9
9
if [ " $1 " = ' mysqld' ]; then
10
+ # Test we're able to startup without errors. We redirect stdout to /dev/null so
11
+ # only the error messages are left.
12
+ result=0
13
+ output=$( " $@ " --verbose --help 2>&1 > /dev/null) || result=$?
14
+ if [ ! " $result " = " 0" ]; then
15
+ echo >&2 ' error: could not run mysql. This could be caused by a misconfigured my.cnf'
16
+ echo >&2 " $output "
17
+ exit 1
18
+ fi
19
+
10
20
# Get config
11
21
DATADIR=" $( " $@ " --verbose --help 2> /dev/null | awk ' $1 == "datadir" { print $2; exit }' ) "
12
22
Original file line number Diff line number Diff line change @@ -7,6 +7,16 @@ if [ "${1:0:1}" = '-' ]; then
7
7
fi
8
8
9
9
if [ " $1 " = ' mysqld' ]; then
10
+ # Test we're able to startup without errors. We redirect stdout to /dev/null so
11
+ # only the error messages are left.
12
+ result=0
13
+ output=$( " $@ " --verbose --help 2>&1 > /dev/null) || result=$?
14
+ if [ ! " $result " = " 0" ]; then
15
+ echo >&2 ' error: could not run mysql. This could be caused by a misconfigured my.cnf'
16
+ echo >&2 " $output "
17
+ exit 1
18
+ fi
19
+
10
20
# Get config
11
21
DATADIR=" $( " $@ " --verbose --help 2> /dev/null | awk ' $1 == "datadir" { print $2; exit }' ) "
12
22
Original file line number Diff line number Diff line change @@ -7,6 +7,16 @@ if [ "${1:0:1}" = '-' ]; then
7
7
fi
8
8
9
9
if [ " $1 " = ' mysqld' ]; then
10
+ # Test we're able to startup without errors. We redirect stdout to /dev/null so
11
+ # only the error messages are left.
12
+ result=0
13
+ output=$( " $@ " --verbose --help 2>&1 > /dev/null) || result=$?
14
+ if [ ! " $result " = " 0" ]; then
15
+ echo >&2 ' error: could not run mysql. This could be caused by a misconfigured my.cnf'
16
+ echo >&2 " $output "
17
+ exit 1
18
+ fi
19
+
10
20
# Get config
11
21
DATADIR=" $( " $@ " --verbose --help --log-bin-index=/tmp/tmp.index 2> /dev/null | awk ' $1 == "datadir" { print $2; exit }' ) "
12
22
You can’t perform that action at this time.
0 commit comments