summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/openssh/files/sshd.rc6')
-rw-r--r--net-misc/openssh/files/sshd.rc613
1 files changed, 7 insertions, 6 deletions
diff --git a/net-misc/openssh/files/sshd.rc6 b/net-misc/openssh/files/sshd.rc6
index ec598cee8822..01083d1d0fc6 100644
--- a/net-misc/openssh/files/sshd.rc6
+++ b/net-misc/openssh/files/sshd.rc6
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6,v 1.15 2005/08/20 03:46:44 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6,v 1.16 2005/08/21 19:09:30 vapier Exp $
depend() {
use logger dns
@@ -19,24 +19,25 @@ checkconfig() {
return 1
fi
- /usr/sbin/sshd -t || return 1
+ gen_keys || return 1
- gen_keys
+ /usr/sbin/sshd -t || return 1
}
gen_keys() {
if [ ! -e /etc/ssh/ssh_host_key ] ; then
einfo "Generating Hostkey..."
- /usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N ''
+ /usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N '' || return 1
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 ''
+ /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' || return 1
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 ''
+ /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' || return 1
fi
+ return 0
}
start() {