spec file
Mate Wierdl
mw at moni.msci.memphis.edu
Thu Mar 9 14:21:47 EST 2000
On Tue, Mar 07, 2000 at 09:36:49PM +1100, Damien Miller wrote:
> On Tue, 7 Mar 2000, Nigel Metheringham wrote:
>
> > > Also, the %post stanza for the server package, starts sshd. But what
> > > if the upgrade is done in single user mode? The sysV initscript does
> > > not check if networking is up---it just seems to start the service no
> > > matter what.
> >
> > I'm unhappy about this - its a complete pain if you are installing ssh
> > as part of your machine build. You may also happen to be missing
> > decent entropy etc under these conditions. I personally modify the
> > spec & init.d files to do the key generation within the start part of
> > the init.d file. I guess if sshd *was* running then starting it again
> > is reasonable, otherwise do not start it.
>
> RTFS:
>
> %post server
> /sbin/chkconfig --add sshd
> if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then
> /usr/bin/ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key -N '' >&2
> fi
> if test -r /var/run/sshd.pid
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> then
> /etc/rc.d/init.d/sshd restart >&2
> fi
>
In my case: I already had a non rpm installation of a "non open" sshd
which was running at the time of the installation. Hence I had
/var/run/sshd.pid. I wanted to install the openssh rpm to check
openssh out (run it first on a different port). If I just installed
the rpm as it is, opensshd would have been started without me having a
chance to think about configuration, etc.
Mate
More information about the openssh-unix-dev
mailing list