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