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 )
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:
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