summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/routing
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-03-19 03:45:02 +0000
committerdes <des@FreeBSD.org>2002-03-19 03:45:02 +0000
commit918221515eb9b2b81a0e9e30f75f0557fce5082a (patch)
treefb406cba80cfbc3725340d39b6a6794b3115a953 /etc/rc.d/routing
parentf350e5199028a467f0627b3c5ffc48112a060c0c (diff)
downloadFreeBSD-src-918221515eb9b2b81a0e9e30f75f0557fce5082a.zip
FreeBSD-src-918221515eb9b2b81a0e9e30f75f0557fce5082a.tar.gz
Don't try to generate ssh keys if ssh isn't installed.
Diffstat (limited to 'etc/rc.d/routing')
-rw-r--r--etc/rc.d/routing18
1 files changed, 11 insertions, 7 deletions
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index 59f5370..eabdd0b 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -847,13 +847,17 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
- if [ ! -f /etc/ssh/ssh_host_key ]; then
- echo ' creating ssh RSA host key';
- /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
- fi
- if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
- echo ' creating ssh DSA host key';
- /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key
+ if [ -x /usr/bin/ssh-keygen ]; then
+ if [ ! -f /etc/ssh/ssh_host_key ]; then
+ echo ' creating ssh RSA host key';
+ /usr/bin/ssh-keygen -trsa1 -N "" \
+ -f /etc/ssh/ssh_host_key
+ fi
+ if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
+ echo ' creating ssh DSA host key';
+ /usr/bin/ssh-keygen -tdsa -N "" \
+ -f /etc/ssh/ssh_host_dsa_key
+ fi
fi
;;
esac
OpenPOWER on IntegriCloud