From: Ignacy Gawędzki Date: Fri, 24 Feb 2017 14:26:24 +0000 (+0100) Subject: openssh: Move key generation to the start function of init script. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92b770cd825915d56ea8d92d063aebdf7ef270a1;p=buildroot.git openssh: Move key generation to the start function of init script. Since there's not much point in generating missing host keys when the init script is called with "stop", the call to ssh-keygen should not be done inconditionally, but in the start function instead. Signed-off-by: Ignacy Gawędzki Acked-by: "Yann E. MORIN" Signed-off-by: Thomas Petazzoni --- diff --git a/package/openssh/S50sshd b/package/openssh/S50sshd index c15114257f..22da41d1ca 100644 --- a/package/openssh/S50sshd +++ b/package/openssh/S50sshd @@ -6,12 +6,12 @@ # Make sure the ssh-keygen progam exists [ -f /usr/bin/ssh-keygen ] || exit 0 -# Create any missing keys -/usr/bin/ssh-keygen -A - umask 077 start() { + # Create any missing keys + /usr/bin/ssh-keygen -A + printf "Starting sshd: " /usr/sbin/sshd touch /var/lock/sshd