Add ssh key fixup runonce script

- Remove the installed keys, and regenerate new ones to ensure that each
board actually ends up with a unique key.

Change-Id: I7fe55474c2a6c90c11c80f5e49d880ff8a9ea0bf
diff --git a/debian/postinst b/debian/postinst
index 2fd7046..b122112 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -1,7 +1,6 @@
 #!/bin/sh -e
 
-# Remove pre-generated ssh host keys and any leftover bootstrap log files. 
-rm -f /etc/ssh/ssh_host_*
+# Remove leftover bootstrap log files.
 rm -f /var/log/bootstrap.log
 
 # Fix up our hostname and make sure it can be resolved to something sane
diff --git a/etc/runonce.d/02-check-ssh-keys b/etc/runonce.d/02-check-ssh-keys
new file mode 100755
index 0000000..0f4b055
--- /dev/null
+++ b/etc/runonce.d/02-check-ssh-keys
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+rm -f /etc/ssh/ssh_host_*
+test -f /etc/ssh/ssh_host_dsa_key || dpkg-reconfigure openssh-server
\ No newline at end of file