lianep at eng.sun.com wrote:

>Darren.Reed at Sun.COM writes:
>
>>>Does it sound helpful for
>>>svcs -l to print the "exec" string of all "method" type property
>>>groups for a service?
>>>
>>>
>
>>What would the output for these lines look like?
>>
>>
>
>I've filed the bug (as a split up of Peter's 6530523) as 6532480,
>and suggested in that bug:
>
> something like the following for ssh:
>
>   method    start /lib/svc/method/sshd\ start
>   method    stop :kill
>   method    refresh /lib/svc/method/sshd\ restart
>
> And for telnet:
>
>   method    inetd_start /usr/sbin/in.telnetd
>   method    inetd_disable :kill
>

That looks great...although the quoted space ("\ ") is a bit funky.
Is it sensible for svcs to remove the '\' here?

The problem is if I try to use that value...

start=$(svcs -l ssh|awk '/^method.*start.*/{print $3;}' -)
case $start in
    :*)...
        ;;
    *)
        if [[ -f "$start" ]] ; then
            ...
        fi
        ;;
esac

...then I need to do "something more" to what svcs
gives me.  It's almost like a "cooked output" would
be nice.

Darren


Reply via email to