Bug 1722 - darn it, let me do the functions script again
darn it, let me do the functions script again
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
5.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
: 1721 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-03-23 19:40 EST by president
Modified: 2014-03-16 22:09 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-03-30 17:43:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description president 1999-03-23 19:40:25 EST
I screwed up the last bug report, this is the change that
needs to be made

From
===============
        else
                pid=`ps auxww | grep '[^[]'$1 | awk '{print
$2}'`
                if [ "$pid" != "" ] ; then
                        echo "$1 $2 (pid $pid) is
running..."
                        return 0
                fi
        fi
=============
to
=============
        elseif [ "$2" != "" ]
                pid=`ps auxww | grep '[^[]'$1 | awk '{print
$2}'`
                if [ "$pid" != "" ] ; then
                        echo "$1 $2 (pid $pid) is
running..."
                        return 0
                fi
        fi
=============
Comment 1 Bill Nottingham 1999-03-24 09:11:59 EST
*** Bug 1721 has been marked as a duplicate of this bug. ***

I really don't know why I should help since you guys seem
to becoming half MicroSoft and have open source in your
mentality, but just because you guys have been good in the
past, am I willing to help you fix a brain dead mistake.
You should check to see if $2 is equal to null first before
using it in /etc/rc.d/init.d/functions

Change
===============================
        else [ "$2" != "" ]
                pid=`ps auxww | grep '[^[]'$1 | awk '{print
$2}'`
                if [ "$pid" != "" ] ; then
                        echo "$1 $2 (pid $pid) is
running..."
                        return 0
                fi
        fi
===========================

to
=========================

        elseif [ "$2" != "" ]
                pid=`ps auxww | grep '[^[]'$1 | awk '{print
$2}'`
                if [ "$pid" != "" ] ; then
                        echo "$1 $2 (pid $pid) is
running..."
                        return 0
                fi
        fi
==========================
Comment 2 Bill Nottingham 1999-03-30 17:43:59 EST
fixed in initscripts-3.97-2. possibly also fixed at some
point earlier.

Note You need to log in before you can comment on or make changes to this bug.