diff options
Diffstat (limited to 'net-misc/openssh')
-rwxr-xr-x | net-misc/openssh/files/sshd | 52 | ||||
-rw-r--r-- | net-misc/openssh/openssh-2.9_p2-r2.ebuild | 4 |
2 files changed, 24 insertions, 32 deletions
diff --git a/net-misc/openssh/files/sshd b/net-misc/openssh/files/sshd index 64adb37da116..43fe96207d4d 100755 --- a/net-misc/openssh/files/sshd +++ b/net-misc/openssh/files/sshd @@ -1,52 +1,44 @@ #!/bin/sh -#RCUPDATE:2 3 4:75:This line is required for script management - -. /etc/rc.d/config/functions -. /etc/rc.d/config/basic - SERVICE="OpenSSH" -opts="start stop restart" - PIDFILE=/var/run/sshd.pid EXE=/usr/sbin/sshd gen_keys() { - if [ ! -e /etc/ssh/ssh_host_key ] ; then - einfo "Generating Hostkey..." - /usr/bin/ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key -N '' - fi + if [ ! -e /etc/ssh/ssh_host_key ] ; then + einfo "Generating Hostkey..." + /usr/bin/ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key -N '' + fi - if [ ! -e /etc/ssh/ssh_host_dsa_key ] ; then - einfo "Generating DSA-Hostkey..." - /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' - fi + if [ ! -e /etc/ssh/ssh_host_dsa_key ] ; then + einfo "Generating DSA-Hostkey..." + /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' + fi + + if [ ! -e /etc/ssh/ssh_host_rsa_key ] ; then + einfo "Generating RSA-Hostkey..." + /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' + fi } start() { - gen_keys + gen_keys - ebegin "Starting $SERVICE" - start-stop-daemon --start --quiet --exec $EXE - eend $? "Started $SERVICE." "Error starting $SERVICE." + ebegin "Starting $SERVICE" + start-stop-daemon --start --quiet --exec $EXE + eend $? "Started $SERVICE." "Error starting $SERVICE." } stop() { - ebegin "Stopping $SERVICE" - start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $EXE - eend $? "Stopped $SERVICE." "Error stopping $SERVICE." + ebegin "Stopping $SERVICE" + start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $EXE + eend $? "Stopped $SERVICE." "Error stopping $SERVICE." } restart() { - stop - start + stop + start } -doservice ${@} - - - - - diff --git a/net-misc/openssh/openssh-2.9_p2-r2.ebuild b/net-misc/openssh/openssh-2.9_p2-r2.ebuild index 05ad19fc0e46..6d600a9ac565 100644 --- a/net-misc/openssh/openssh-2.9_p2-r2.ebuild +++ b/net-misc/openssh/openssh-2.9_p2-r2.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Achim Gottinger <achim@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-2.9_p2-r2.ebuild,v 1.1 2001/08/18 02:10:29 chadh Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-2.9_p2-r2.ebuild,v 1.2 2001/08/24 06:04:59 chadh Exp $ P=openssh-2.9p2 A=${P}.tar.gz @@ -47,5 +47,5 @@ src_install() { insinto /etc/pam.d donewins ${FILESDIR}/sshd.pam sshd exeinto /etc/rc.d/init.d - newexe ${FILESDIR}/openssh sshd + newexe ${FILESDIR}/sshd sshd } |