From mboxrd@z Thu Jan 1 00:00:00 1970 From: Harald Hoyer Subject: Re: [PATCH] dracut-lib.sh: bugfix for pidof function Date: Tue, 28 Jan 2014 15:37:12 +0100 Message-ID: <52E7C098.5050502@redhat.com> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: initramfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Stig Telfer , "initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" On 01/24/2014 04:19 PM, Stig Telfer wrote: > It appears there is a simple substitution error in the pidof shell function which causes it to fail to find processes. In my case, processes started by 95nfs are not terminated in the cleanup hook. This causes knock-on effects disturbing the root filesystem service dependencies. > > Enjoy, > Stig Telfer > > diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh > index 85f7cdf..3f10bc1 100755 > --- a/modules.d/99base/dracut-lib.sh > +++ b/modules.d/99base/dracut-lib.sh > @@ -969,7 +969,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then > for i in /proc/*/exe; do > [ -e "$i" ] || return 1 > if [ -n "$_exe" ]; then > - [ "$i" -ef "$_cmd" ] || continue > + [ "$i" -ef "$_exe" ] || continue > else > _rl=$(readlink -f "$i"); > [ "${_rl%/$_cmd}" != "$_rl" ] || continue > > Thanks! Pushed.