tags 464659 + patch
thanks

Patch is attached.
diff -pruN file-rc-0.8.10.orig/invoke-rc.d file-rc-0.8.10/invoke-rc.d
--- file-rc-0.8.10.orig/invoke-rc.d	2003-02-04 22:16:03.000000000 +0200
+++ file-rc-0.8.10/invoke-rc.d	2008-04-06 20:57:16.000000000 +0300
@@ -366,7 +366,7 @@ i=0
 while [ -f "$LOCKFILE" ] && [ "$i" -lt "32" ]
 do
     read pid < "$LOCKFILE"
-    if ! kill -0 $pid > /dev/null 2>&1
+    if ! kill -s 0 $pid > /dev/null 2>&1
     then
         [ "$BEQUIET" != "" ] || echo ""
         printerror "found stale lockfile '$LOCKFILE'. Removing it."
diff -pruN file-rc-0.8.10.orig/rc file-rc-0.8.10/rc
--- file-rc-0.8.10.orig/rc	2006-07-03 18:51:01.000000000 +0300
+++ file-rc-0.8.10/rc	2008-04-06 20:56:13.000000000 +0300
@@ -63,7 +63,7 @@ i=0
 while [ -f "$LOCKFILE" ] && [ "$previous" != "N" ]
 do
     read pid < "$LOCKFILE"
-    if ! kill -0 $pid &> /dev/null
+    if ! kill -s 0 $pid > /dev/null 2>&1
     then
 	echo "$0: found stale lockfile '$LOCKFILE'. Ignoring it." >&2
 	rm -f "$LOCKFILE"	# external command (does not work on R/O fs)
@@ -77,10 +77,10 @@ do
 	then
 	    # Try killing locking process, if booting, rebooting or halting.
 	    echo "Sending TERM signal to $pid." >&2
-	    kill -15 $pid
+	    kill -s 15 $pid
 	    sleep 5
 	    echo "Sending KILL signal to $pid." >&2	
-	    kill -9 $pid &> /dev/null
+	    kill -s 9 $pid > /dev/null 2>&1
 	    rm -f "$LOCKFILE"	# external command (does not work on R/O FS)
 	    sleep 5
 	    break
diff -pruN file-rc-0.8.10.orig/rcfile2link.sh file-rc-0.8.10/rcfile2link.sh
--- file-rc-0.8.10.orig/rcfile2link.sh	2004-04-25 12:21:05.000000000 +0300
+++ file-rc-0.8.10/rcfile2link.sh	2008-04-06 20:55:48.000000000 +0300
@@ -18,7 +18,7 @@ i=0
 while [ -f "$LOCKFILE" -a "$previous" != "N" ]
 do
     read pid < "$LOCKFILE"
-    if ! kill -0 $pid &> /dev/null
+    if ! kill -s 0 $pid > /dev/null 2>&1
     then
 	echo "$0: found stale lockfile '$LOCKFILE'. Ignoring it." >&2
 # restriction on built-in functions ...
diff -pruN file-rc-0.8.10.orig/update-rc.d file-rc-0.8.10/update-rc.d
--- file-rc-0.8.10.orig/update-rc.d	2006-06-30 23:13:33.000000000 +0300
+++ file-rc-0.8.10/update-rc.d	2008-04-06 20:56:26.000000000 +0300
@@ -338,7 +338,7 @@ i=0
 while [ -f "$LOCKFILE" ]
 do
     read pid < "$LOCKFILE"
-    if ! kill -0 $pid &> /dev/null
+    if ! kill -s 0 $pid > /dev/null 2>&1
     then
         remove_lock
         break

Reply via email to