Blame 0004-99base-dracut-lib.sh-killproc-prefix-local-variables.patch

Harald Hoyer 6adbc8
From 4d63882615543b19b779607563ab2a098d54b403 Mon Sep 17 00:00:00 2001
Harald Hoyer 6adbc8
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 6adbc8
Date: Fri, 9 Dec 2011 10:12:05 +0100
Harald Hoyer 6adbc8
Subject: [PATCH] 99base/dracut-lib.sh: killproc, prefix local variables
Harald Hoyer 6adbc8
Harald Hoyer 6adbc8
---
Harald Hoyer 6adbc8
 modules.d/99base/dracut-lib.sh |   16 ++++++++--------
Harald Hoyer 6adbc8
 1 files changed, 8 insertions(+), 8 deletions(-)
Harald Hoyer 6adbc8
Harald Hoyer 6adbc8
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
Harald Hoyer 6adbc8
index e86d209..c881869 100755
Harald Hoyer 6adbc8
--- a/modules.d/99base/dracut-lib.sh
Harald Hoyer 6adbc8
+++ b/modules.d/99base/dracut-lib.sh
Harald Hoyer 6adbc8
@@ -627,14 +627,14 @@ wait_for_dev()
Harald Hoyer 6adbc8
 }
Harald Hoyer 6adbc8
 
Harald Hoyer 6adbc8
 killproc() {
Harald Hoyer 6adbc8
-    local exe="$(command -v $1)"
Harald Hoyer 6adbc8
-    local sig=$2
Harald Hoyer 6adbc8
-    local i
Harald Hoyer 6adbc8
-    [ -x "$exe" ] || return 1
Harald Hoyer 6adbc8
-    for i in /proc/[0-9]*; do 
Harald Hoyer 6adbc8
-        [ "$i" = "/proc/1" ] && continue
Harald Hoyer 6adbc8
-        if [ -e "$i"/exe ] && [  "$i/exe" -ef "$exe" ] ; then
Harald Hoyer 6adbc8
-            kill $sig ${i##*/}
Harald Hoyer 6adbc8
+    local _exe="$(command -v $1)"
Harald Hoyer 6adbc8
+    local _sig=$2
Harald Hoyer 6adbc8
+    local _i
Harald Hoyer 6adbc8
+    [ -x "$_exe" ] || return 1
Harald Hoyer 6adbc8
+    for _i in /proc/[0-9]*; do
Harald Hoyer 6adbc8
+        [ "$_i" = "/proc/1" ] && continue
Harald Hoyer 6adbc8
+        if [ -e "$_i"/_exe ] && [  "$_i/_exe" -ef "$_exe" ] ; then
Harald Hoyer 6adbc8
+            kill $_sig ${_i##*/}
Harald Hoyer 6adbc8
         fi
Harald Hoyer 6adbc8
     done
Harald Hoyer 6adbc8
 }