source: pkg/security/vinnie/main/mysql-5.1/trunk/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch @ 6989

Revision 6989, 1.6 KB checked in by alanbach-guest, 4 years ago (diff)
  • Updated mysql-5.1 from lenny-backports
Line 
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## 38_scripts__mysqld_safe.sh__signals.dpatch by  <ch@debian.org>
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Executes /etc/init.d/mysql on signals
6## DP: Reported as http://bugs.mysql.com/bug.php?id=31361
7
8@DPATCH@
9
10--- old/scripts/mysqld_safe.sh  2006-07-29 13:12:34.000000000 +0200
11+++ old/scripts/mysqld_safe.sh  2006-07-29 13:14:08.000000000 +0200
12@@ -16,8 +16,6 @@
13 # This command can be used as pipe to syslog. With "-s" it also logs to stderr.
14 ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i"
15 
16-trap '' 1 2 3 15                       # we shouldn't let anyone kill us
17-
18 umask 007
19 
20 defaults=
21@@ -122,7 +122,7 @@
22       # sed buffers output (only GNU sed supports a -u (unbuffered) option)
23       # which means that messages may not get sent to syslog until the
24       # mysqld process quits.
25-      cmd="$cmd 2>&1 | logger -t '$syslog_tag_mysqld' -p daemon.error"
26+      cmd="$cmd 2>&1 | logger -t '$syslog_tag_mysqld' -p daemon.error & wait"
27       ;;
28     *)
29       echo "Internal program error (non-fatal):" \
30@@ -352,6 +350,13 @@
31 fi
32 
33 #
34+# From now on, we catch signals to do a proper shutdown of mysqld
35+# when signalled to do so.
36+#
37+trap '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf refresh & wait' 1 # HUP
38+trap '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf shutdown' 2 3 15 # INT QUIT and TERM
39+
40+#
41 # Uncomment the following lines if you want all tables to be automatically
42 # checked and repaired during startup. You should add sensible key_buffer
43 # and sort_buffer values to my.cnf to improve check performance or require
Note: See TracBrowser for help on using the repository browser.