ssh-keygen -d is no longer supported and is now -t dsa
[bootmanager.git] / source / steps / StartDebug.py
index 62a94a1..6a9e130 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/python
-
+#
 # Copyright (c) 2003 Intel Corporation
 # All rights reserved.
 #
@@ -69,6 +69,11 @@ def Run( vars, log, last_resort = True):
     ssh_home= "/root/.ssh"
     cancel_boot_flag= "/tmp/CANCEL_BOOT"
     sshd_started_flag= "/tmp/SSHD_RUNNING"
+
+    # pre-sshd
+    pre_sshd_script= os.path.join(ssh_source_files, "pre-sshd")
+    if os.path.exists(pre_sshd_script):
+        utils.sysexec_noerr( pre_sshd_script, log )
     
     # create host keys if needed
     if not os.path.isdir (ssh_dir):
@@ -84,7 +89,8 @@ def Run( vars, log, last_resort = True):
     key=ssh_dir+"/ssh_host_dsa_key"
     if not os.path.isfile (key):
         log.write("Creating host dsa key %s\n"%key)
-        utils.sysexec( "ssh-keygen -d -f %s -N ''" % key, log )
+        # very old versions did 'ssh-keygen -d' instead of 'ssh-keygen -t dsa' 
+        utils.sysexec( "ssh-keygen -t dsa -f %s -N ''" % key, log )
 
     # (over)write sshd config
     utils.sysexec( "cp -f %s/sshd_config %s/sshd_config" % (ssh_source_files,ssh_dir), log )