Page MenuHomeFreeBSD

D23911.1778504635.diff
No OneTemporary

Size
746 B
Referenced Files
None
Subscribers
None

D23911.1778504635.diff

Index: head/libexec/rc/rc.d/sshd
===================================================================
--- head/libexec/rc/rc.d/sshd
+++ head/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
Mon, May 11, 1:03 PM (1 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28680276
Default Alt Text
D23911.1778504635.diff (746 B)

Event Timeline