[Bug 634] init scripts which run programs of the same name fail onrestart

Nathan Coulson conathan at conet.dyndns.org
Thu Mar 11 07:52:21 PST 2004


> http://blfs-bugs.linuxfromscratch.org/show_bug.cgi?id=634
>
> tushar at linuxfromscratch.org changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|NEW                         |ASSIGNED
>
>
>
> ------- Additional Comments From tushar at linuxfromscratch.org  2004-03-11
> 23:58 -------
> This will be rectified in a new release of lfs-bootscripts. Already fixed
> in
> lfs-bootscripts-cvs
> <http://cvs.linuxfromscratch.org/index.cgi/LFS/bootscripts/rc.d/init.d/functions?rev=1.6&content-type=text/x-cvsweb-markup>.

[1.12]
getpids()
{
        base=${1##*/}
        pidlist=$(pidof -o $$ -o $PPID -x $base)
}

[1.99.x]
getpids()
{
        base=${1##*/}
        local lpids=""
        local pid

        pidlist=""
        lpids=$(pidof $base)
        for pid in $lpids
        do
                if [ $pid -ne $$ ] && [ $pid -ne $PPID ]
                then
                        pidlist="$pidlist $pid"
                fi
        done
}


Looking at it more closely,  I dont see how pidof could do what was
described.  [either version].



More information about the blfs-book mailing list