From 8ae2b899c7f297964c62d36c96af2a820aec961c Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Sat, 28 Nov 2009 04:18:14 +0000 Subject: [PATCH] Add means for executing a script before starting sshd. --- source/steps/StartDebug.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/steps/StartDebug.py b/source/steps/StartDebug.py index 62a94a1..73420ed 100644 --- a/source/steps/StartDebug.py +++ b/source/steps/StartDebug.py @@ -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): + os.spawnv(os.P_WAIT, pre_sshd_script, [pre_sshd_script]) # create host keys if needed if not os.path.isdir (ssh_dir): -- 2.43.0