Solaris buildpkg.sh: postinstall script added

Daniel Bergman d-b at home.se
Mon Mar 4 07:58:15 EST 2002


Actually, I think the script shouldn't start SSH no matter what since I 
believe it should be done interactive by an administrator.

But I see your point, would be handy though.

Regards,
Daniel


>>
>> I agree with Ben.
> [snip]
>> I think pre/post package scripts shouldn't mess with running processes.
>
> Shouldn't mess with a process that already running, or shouldn't mess
> with running a new process? I mean is it OK to start the daemon if it's
> not running? (Even if there's one running and didn't find it, the new one
> will exit when it can't bind() to 22.)
>
> If it's inappropriate, the whole fragment can be deleted, the rest of the
> postinstall won't be affected.
>
> To top it off, I mixed up the AIX and Solaris scripts and posted the
> piece from the wrong one. Whoops.
>
>> ># 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
> Should be :	    /etc/init.d/opensshd start
>> >         fi
>> > fi
>
> 		-Daz.
>
>



--
Daniel Bergman
Phone: 08 - 55066265
Mobile: 070 - 289 30 39
Fax: 08 - 59827056
Email: d-b at home.se



More information about the openssh-unix-dev mailing list