contrib/solaris/opensshd.in patch

Jos Backus josb at cncdsl.com
Sat Jan 19 10:45:13 EST 2002


[Slightly off-topic]

On Fri, Jan 18, 2002 at 02:58:05PM -0800, Frank Cusack wrote:
>     PROG=sshd
>     ...
>     pid=`cat /var/run/$PROG.pid`
>     if pgrep $PROG | /usr/xpg4/bin/grep -q $pid /dev/fd/0; then
> 	kill $pid && rm -f /var/run/$PROG.pid
>     fi
> 
> but later pkill's (Solaris 8 anyway) does all that for you
> 
>     pkill -P 1 sshd
> 
> I assume you want this to run on earlier solari, so the first form is
> probably a bit better (except don't use pgrep).

Using Dan Bernstein's daemontools I'm glad I can just do

    svc -d /service/sshd

on Solaris (or FreeBD, or ...) and be done.  Pidfiles are just so messy.

-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb at cncdsl.com     _/_/   _/_/_/            use Std::Disclaimer;



More information about the openssh-unix-dev mailing list