[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Fwd: "status" function for init scripts]



Sorry for breaking the thread-id, I've just subscribed to the list to send this reply.

[Petter Reinholdtsen]
> [Dustin Kirkland]
> > We would appreciate a careful review and inclusion of the patch
> > below into Debian's LSB functions.
>
> How should the function be used with pid files?  What if the pid file
> have a different name than the daemon name?

Well, specifically, the patch that we're offering is using an existing
lsb function pidofproc() which in turn uses getopts and then /bin/pidof
to get access to the status of the process.

I suspect it may be needed to add a part to the function that duplicates
the getopts part of the pidofproc() function, specifically this part -
which is also duplicated in killproc():

    OPTIND=1
    while getopts p: opt ; do
        case "$opt" in
            p)  pidfile="$OPTARG"; specified=1;;
        esac
    done
    shift $(($OPTIND - 1))

Alternatively, we could add some smarts (and perhaps re-order our
parameters) to just pass on all parameters and let pidofproc() take care
of things.

I think the latter would be preferable.

-- 
Onno Benschop

Connected via Optus B3 at S31°54'06" - E115°50'39" (Yokine, WA)
--
()/)/)()        ..ASCII for Onno..
|>>?            ..EBCDIC for Onno..
--- -. -. ---   ..Morse for Onno..

ITmaze   -   ABN: 56 178 057 063   -  ph: 04 1219 8888   -   onno@itmaze.com.au



Reply to: