# HG changeset patch
# User Florian Haas <[email protected]>
# Date 1274013622 -7200
# Node ID 7d66d53e169f6bff8da1c1cabba0a0b0342f3a35
# Parent 7b25263a3fdc5801e1595c934152283652fbe1b4
Low: replace "kill -SIG" with "kill -s SIG" (Debian #581073)
Remove possible bashism.
diff -r 7b25263a3fdc -r 7d66d53e169f heartbeat/ClusterMon
--- a/heartbeat/ClusterMon Sun May 16 13:49:37 2010 +0200
+++ b/heartbeat/ClusterMon Sun May 16 14:40:22 2010 +0200
@@ -142,7 +142,7 @@
if [ -f $OCF_RESKEY_pidfile ]; then
pid=`cat $OCF_RESKEY_pidfile`
if [ ! -z $pid ]; then
- kill -9 $pid
+ kill -s 9 $pid
rm -f $OCF_RESKEY_pidfile
fi
fi
@@ -152,7 +152,7 @@
ClusterMon_monitor() {
if [ -f $OCF_RESKEY_pidfile ]; then
pid=`cat $OCF_RESKEY_pidfile`
- [ "$pid" ] && kill -0 $pid &&
+ [ "$pid" ] && kill -s 0 $pid &&
exit $OCF_SUCCESS
fi
exit $OCF_NOT_RUNNING
diff -r 7b25263a3fdc -r 7d66d53e169f heartbeat/Pure-FTPd
--- a/heartbeat/Pure-FTPd Sun May 16 13:49:37 2010 +0200
+++ b/heartbeat/Pure-FTPd Sun May 16 14:40:22 2010 +0200
@@ -104,7 +104,7 @@
isRunning()
{
- kill -0 "$1" > /dev/null
+ kill -s 0 "$1" > /dev/null
}
PureFTPd_status()
diff -r 7b25263a3fdc -r 7d66d53e169f heartbeat/SphinxSearchDaemon
--- a/heartbeat/SphinxSearchDaemon Sun May 16 13:49:37 2010 +0200
+++ b/heartbeat/SphinxSearchDaemon Sun May 16 14:40:22 2010 +0200
@@ -142,7 +142,7 @@
isRunning()
{
- kill -0 "$1" > /dev/null && [ `ps -p "$1" | grep searchd | wc -l` -eq 1 ]
+ kill -s 0 "$1" > /dev/null && [ `ps -p "$1" | grep searchd | wc -l` -eq 1 ]
}
searchd_status() {
diff -r 7b25263a3fdc -r 7d66d53e169f heartbeat/Xinetd
--- a/heartbeat/Xinetd Sun May 16 13:49:37 2010 +0200
+++ b/heartbeat/Xinetd Sun May 16 14:40:22 2010 +0200
@@ -74,7 +74,7 @@
hup_inetd () {
pid=`ps -e -o pid,command | grep '/[x]inetd' | awk '{print $1}'`
if [ "$pid" ]; then
- if kill -HUP $pid; then
+ if kill -s HUP $pid; then
:
else
ocf_log err "Could not SigHUP xinetd superdaemon!"
diff -r 7b25263a3fdc -r 7d66d53e169f heartbeat/anything
--- a/heartbeat/anything Sun May 16 13:49:37 2010 +0200
+++ b/heartbeat/anything Sun May 16 14:40:22 2010 +0200
@@ -56,7 +56,7 @@
anything_status() {
if test -f "$pidfile"
then
- if pid=`getpid $pidfile` && [ "$pid" ] && kill -0 $pid
+ if pid=`getpid $pidfile` && [ "$pid" ] && kill -s 0 $pid
then
return $OCF_RUNNING
else
@@ -129,7 +129,7 @@
let "i++"
done
ocf_log warn "Stop with SIGTERM failed/timed out, now sending
SIGKILL."
- kill -9 $pid
+ kill -s 9 $pid
rm -f $pidfile
if ! anything_status
then
diff -r 7b25263a3fdc -r 7d66d53e169f heartbeat/apache
--- a/heartbeat/apache Sun May 16 13:49:37 2010 +0200
+++ b/heartbeat/apache Sun May 16 14:40:22 2010 +0200
@@ -380,7 +380,7 @@
[ -d /proc/$ApachePID ]
else
# This assumes we're running as root...
- kill -0 "$ApachePID" >/dev/null 2>&1
+ kill -s 0 "$ApachePID" >/dev/null 2>&1
fi
}
diff -r 7b25263a3fdc -r 7d66d53e169f heartbeat/mysql
--- a/heartbeat/mysql Sun May 16 13:49:37 2010 +0200
+++ b/heartbeat/mysql Sun May 16 14:40:22 2010 +0200
@@ -574,7 +574,7 @@
if [ -d /proc -a -d /proc/1 ]; then
[ "u$pid" != "u" -a -d /proc/$pid ]
else
- kill -0 $pid >/dev/null 2>&1
+ kill -s 0 $pid >/dev/null 2>&1
fi
if [ $? -eq 0 ]; then
diff -r 7b25263a3fdc -r 7d66d53e169f heartbeat/mysql-proxy
--- a/heartbeat/mysql-proxy Sun May 16 13:49:37 2010 +0200
+++ b/heartbeat/mysql-proxy Sun May 16 14:40:22 2010 +0200
@@ -213,7 +213,7 @@
isRunning()
{
- kill -0 "$1" 2>/dev/null
+ kill -s 0 "$1" 2>/dev/null
}
mysqlproxy_status()
@@ -344,7 +344,7 @@
{
if mysqlproxy_status; then
ocf_log info "Reloading MySQL Proxy."
- kill -HUP `cat ${pidfile}`
+ kill -s HUP `cat ${pidfile}`
fi
}
diff -r 7b25263a3fdc -r 7d66d53e169f heartbeat/pingd
--- a/heartbeat/pingd Sun May 16 13:49:37 2010 +0200
+++ b/heartbeat/pingd Sun May 16 14:40:22 2010 +0200
@@ -184,7 +184,7 @@
pid=`cat $OCF_RESKEY_pidfile`
fi
if [ ! -z $pid ]; then
- kill -9 $pid
+ kill -s 9 $pid
rc=$?
if [ $rc = 0 -o $rc = 1 ]; then
@@ -203,7 +203,7 @@
pid=`cat $OCF_RESKEY_pidfile`
fi
if [ ! -z $pid ]; then
- kill -0 $pid
+ kill -s 0 $pid
if [ $? = 0 ]; then
exit $OCF_SUCCESS
fi
diff -r 7b25263a3fdc -r 7d66d53e169f heartbeat/proftpd
--- a/heartbeat/proftpd Sun May 16 13:49:37 2010 +0200
+++ b/heartbeat/proftpd Sun May 16 14:40:22 2010 +0200
@@ -122,7 +122,7 @@
isRunning()
{
- kill -0 "$1" > /dev/null 2>&1
+ kill -s 0 "$1" > /dev/null 2>&1
}
proftpd_status()
@@ -186,7 +186,7 @@
RET=$?
if [ "$RET" -eq 0 ]; then
ocf_log info "Killing Proftpd PID $PID
with SIGKILL"
- kill -9 $PID > /dev/null 2>&1
+ kill -s 9 $PID > /dev/null 2>&1
while isRunning "$PID"
do
sleep 1
diff -r 7b25263a3fdc -r 7d66d53e169f heartbeat/rsyncd
--- a/heartbeat/rsyncd Sun May 16 13:49:37 2010 +0200
+++ b/heartbeat/rsyncd Sun May 16 14:40:22 2010 +0200
@@ -184,7 +184,7 @@
if [ -n "$PID" ] ; then
kill $PID
if [ $? -ne 0 ]; then
- kill -SIGKILL $PID
+ kill -s KILL $PID
if [ $? -ne 0 ]; then
ocf_log err "Error. Could not stop
rsync daemon."
return $OCF_ERR_GENERIC
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/