Solaris buildpkg.sh: postinstall script added
Darren Tucker
dtucker at zip.com.au
Sun Mar 3 20:09:03 EST 2002
Ben Lindstrom wrote:
[restarting daemons from postinstall scripts]
> Reason being is there are times you install upgrade packages for
> general testing, and you don't want them to kill your known good
> sshd. Even on test platforms.. =) It makes people very growly when
> they have to get up from their desks and restat sshd from the sun
> console. =)
As I said in a private (because I forgot to cc the list) message if you
upgrade sshd and don't test it before logging out then you deserve what
you get :-)
Ben pointed out that it's a personal preference thing, and he's right.
While it's really easy to restart it yourself if that's what you want
it's too late if you didn't want to.
So, how about:
# Check for running sshd and start if not running
if [ -f $piddir/sshd.pid ]
then
pid=\`cat $piddir/sshd.pid\`
if ps -p \$pid | grep sshd >/dev/null
then
echo "sshd already running (pid \$pid)."
else
echo "Starting sshd."
$sbindir/sshd
fi
fi
-Daz.
More information about the openssh-unix-dev
mailing list