Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] openssh: Move key generation to the start function of init script.
@ 2017-02-24 14:26 Ignacy Gawędzki
  2017-02-24 14:32 ` Yann E. MORIN
  2017-02-26 13:38 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Ignacy Gawędzki @ 2017-02-24 14:26 UTC (permalink / raw)
  To: buildroot

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 <ignacy.gawedzki@green-communications.fr>
---
 package/openssh/S50sshd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/openssh/S50sshd b/package/openssh/S50sshd
index c151142..22da41d 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
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-26 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-24 14:26 [Buildroot] [PATCH] openssh: Move key generation to the start function of init script Ignacy Gawędzki
2017-02-24 14:32 ` Yann E. MORIN
2017-02-26 13:38 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox