change order so old boot cds don't keep pulling the boot manager from plc.
[bootmanager.git] / source / steps / StartDebug.py
index ebb7858..1bc6d23 100644 (file)
@@ -1,3 +1,11 @@
+#!/usr/bin/python2
+
+# Copyright (c) 2003 Intel Corporation
+# All rights reserved.
+#
+# Copyright (c) 2004-2006 The Trustees of Princeton University
+# All rights reserved.
+
 import os
 
 from Exceptions import *
@@ -67,6 +75,9 @@ def Run( vars, log ):
         pass
 
     if not sshd_started:
+        # NOTE: these commands hang if ssh_host_*_key files exist, b/c 
+        #     ssh-keygen asks for user input to confirm the overwrite.  
+               #     could fix this with "echo 'y' | "
         log.write( "Creating ssh host keys\n" )
         
         utils.makedirs( ssh_dir )
@@ -77,7 +88,7 @@ def Run( vars, log ):
         utils.sysexec( "ssh-keygen -d -f %s/ssh_host_dsa_key -N ''" %
                        ssh_dir, log )
 
-        if BOOT_CD_VERSION[0] == 3:
+        if BOOT_CD_VERSION[0] >= 3:
             utils.sysexec( "cp -f %s/sshd_config_v3 %s/sshd_config" %
                            (ssh_source_files,ssh_dir), log )
         else:
@@ -109,15 +120,14 @@ def Run( vars, log ):
     else:
         log.write( "sshd already running\n" )
 
+    
+    # this will make the initial script stop requesting scripts from PLC
+    utils.sysexec( "touch %s" % cancel_boot_flag, log )
 
     # for ease of use, setup lvm on 2.x cds
     if BOOT_CD_VERSION[0] == 2:
         compatibility.setup_lvm_2x_cd(vars,log)
 
-    
-    # this will make the initial script stop requesting scripts from PLC
-    utils.sysexec( "touch %s" % cancel_boot_flag, log )
-
     print message
     
     return