Sfoglia il codice sorgente

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 <ignacy.gawedzki@green-communications.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Ignacy Gawędzki 8 anni fa
parent
commit
92b770cd82
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      package/openssh/S50sshd

+ 3 - 3
package/openssh/S50sshd

@@ -6,12 +6,12 @@
 # Make sure the ssh-keygen progam exists
 # Make sure the ssh-keygen progam exists
 [ -f /usr/bin/ssh-keygen ] || exit 0
 [ -f /usr/bin/ssh-keygen ] || exit 0
 
 
-# Create any missing keys
-/usr/bin/ssh-keygen -A
-
 umask 077
 umask 077
 
 
 start() {
 start() {
+	# Create any missing keys
+	/usr/bin/ssh-keygen -A
+
 	printf "Starting sshd: "
 	printf "Starting sshd: "
 	/usr/sbin/sshd
 	/usr/sbin/sshd
 	touch /var/lock/sshd
 	touch /var/lock/sshd