Bug 1722 - darn it, let me do the functions script again
Summary: darn it, let me do the functions script again
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 5.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
: 1721 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-03-24 00:40 UTC by president
Modified: 2014-03-17 02:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-03-30 22:43:37 UTC


Attachments (Terms of Use)

Description president 1999-03-24 00:40:25 UTC
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 14:11:59 UTC
*** 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 22:43:59 UTC
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.