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

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

 



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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux