blob: 9ca2d1277c3f05997f5d3a7249ae5ce5cacfbc00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
Add a --nowatch option to mysqld_safe that causes it to exit after
spawning mysqld. We don't need mysqld_safe to restart mysqld after
a crash, because systemd can do that just fine.
diff -Naur mysql-5.5.14.orig/scripts/mysqld_safe.sh mysql-5.5.14/scripts/mysqld_safe.sh
--- mysql-5.5.14.orig/scripts/mysqld_safe.sh 2011-06-21 12:42:40.000000000 -0400
+++ mysql-5.5.14/scripts/mysqld_safe.sh 2011-07-25 13:52:40.363068060 -0400
@@ -15,6 +15,7 @@
KILL_MYSQLD=1;
MYSQLD=
niceness=0
+nowatch=0
mysqld_ld_preload=
mysqld_ld_library_path=
@@ -54,6 +55,7 @@
--mysqld=FILE Use the specified file as mysqld
--mysqld-version=VERSION Use "mysqld-VERSION" as mysqld
--nice=NICE Set the scheduling priority of mysqld
+ --nowatch Exit after starting mysqld
--plugin-dir=DIR Plugins are under DIR or DIR/VERSION, if
VERSION is given
--skip-kill-mysqld Don't try to kill stray mysqld processes
@@ -140,8 +142,16 @@
;;
esac
- #echo "Running mysqld: [$cmd]"
- eval "$cmd"
+ if test $nowatch -eq 1
+ then
+ # We'd prefer to exec $cmd here, but SELinux needs to be fixed first
+ #/usr/bin/logger "Running mysqld: $cmd"
+ eval "$cmd &"
+ exit 0
+ else
+ #echo "Running mysqld: [$cmd]"
+ eval "$cmd"
+ fi
}
shell_quote_string() {
@@ -198,6 +208,7 @@
fi
;;
--nice=*) niceness="$val" ;;
+ --nowatch) nowatch=1 ;;
--open-files-limit=*) open_files="$val" ;;
--open_files_limit=*) open_files="$val" ;;
--skip-kill-mysqld*) KILL_MYSQLD=0 ;;
|