From 3d5f3aa2b4b4f4fbd71c8887d3a24239ed2062ff Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 4 Nov 2011 20:33:24 +0000 Subject: [PATCH] * Print the host key after sshd has started to prevent a potential race. svn path=/nixos/trunk/; revision=30236 --- modules/virtualisation/ec2-data.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/virtualisation/ec2-data.nix b/modules/virtualisation/ec2-data.nix index f55e6b696508..b0072f4f890c 100644 --- a/modules/virtualisation/ec2-data.nix +++ b/modules/virtualisation/ec2-data.nix @@ -39,7 +39,15 @@ with pkgs.lib; rm -f /root/key.pub fi fi + ''; + }; + jobs.printHostKey = + { name = "print-host-key"; + task = true; + startOn = "started sshd"; + script = + '' # Print the host public key on the console so that the user # can obtain it securely by parsing the output of # ec2-get-console-output. @@ -49,5 +57,4 @@ with pkgs.lib; ''; }; - }