Page MenuHomeFreeBSD

D23911.id69039.diff
No OneTemporary

D23911.id69039.diff

Index: libexec/rc/rc.d/sshd
===================================================================
--- libexec/rc/rc.d/sshd
+++ libexec/rc/rc.d/sshd
@@ -45,18 +45,19 @@
;;
esac
+ if [ -f "${keyfile}" ] ; then
+ info "$ALG host key exists."
+ return 0
+ fi
+
if [ ! -x /usr/bin/ssh-keygen ] ; then
warn "/usr/bin/ssh-keygen does not exist."
return 1
fi
- if [ -f "${keyfile}" ] ; then
- info "$ALG host key exists."
- else
- echo "Generating $ALG host key."
- /usr/bin/ssh-keygen -q -t $alg -f "$keyfile" -N ""
- /usr/bin/ssh-keygen -l -f "$keyfile.pub"
- fi
+ echo "Generating $ALG host key."
+ /usr/bin/ssh-keygen -q -t $alg -f "$keyfile" -N ""
+ /usr/bin/ssh-keygen -l -f "$keyfile.pub"
}
sshd_keygen()

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 21, 2:04 PM (11 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25768950
Default Alt Text
D23911.id69039.diff (731 B)

Event Timeline