[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 1/3] Improve logging of ssh-keygen.



Log stdout/stderr of each ssh-keygen invocation to its own log file.
---
 anaconda |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/anaconda b/anaconda
index ae759c0..ef891de 100755
--- a/anaconda
+++ b/anaconda
@@ -399,7 +399,12 @@ def setupGraphicalLinks():
 def createSshKey(algorithm, keyfile):
     path = '/etc/ssh/%s' % (keyfile,)
     argv = ['-q','-t',algorithm,'-f',path,'-C','','-N','']
-    iutil.execWithRedirect('ssh-keygen', argv, searchPath=1)
+    log.info("running \"%s\"" % (" ".join(['ssh-keygen']+argv),))
+
+    so = "/tmp/ssh-keygen-%s-stdout.log" % (algorithm,)
+    se = "/tmp/ssh-keygen-%s-stderr.log" % (algorithm,)
+    iutil.execWithRedirect('ssh-keygen', argv, stdout=so, stderr=se,
+                           searchPath=1)
 
 def startSsh():
     if not flags.sshd:
-- 
1.6.5.rc2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]