Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0252-99base-dracut-lib.sh-fixed-killproc.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0252-99base-dracut-lib.sh-fixed-killproc.patch of Package dracut
From 278cc2e163b6cace2ec540cbe7fdc0dab176521b Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Tue, 18 Oct 2011 10:04:27 +0200 Subject: [PATCH] 99base/dracut-lib.sh: fixed killproc() --- modules.d/99base/dracut-lib.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 429378f..c4f353d 100644 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -245,12 +245,13 @@ ip_to_var() { } killproc() { - local exe=$(type -p $1) - local sig=$2 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 [ -a "$i"/exe ] && [ "$i/exe" -ef "$exe" ] ; then + if [ -e "$i"/exe ] && [ "$i/exe" -ef "$exe" ] ; then kill $sig ${i##*/} fi done -- 1.8.3.1