#!/usr/bin/python
-
+#
# Copyright (c) 2003 Intel Corporation
# All rights reserved.
#
# pre-sshd
pre_sshd_script= os.path.join(ssh_source_files, "pre-sshd")
if os.path.exists(pre_sshd_script):
- os.spawnv(os.P_WAIT, pre_sshd_script, [pre_sshd_script])
+ utils.sysexec_noerr( pre_sshd_script, log )
# create host keys if needed
if not os.path.isdir (ssh_dir):
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 )