[PATCH] [PATCH] Clean up tracebacks saved in pstore space (#950709)

Peter Jones pjones at redhat.com
Wed Apr 10 19:57:26 UTC 2013


These variables are tracebacks from some old installation, and they
should have been reaped by that installation.  Removing these also  means
that in some (buggy) situations, installation may eventually converge on
working after re-trying several times :/

The cases it'll actually make installation work where it didn't before
/may/ require an intervening reboot, depending on the implementation of
the hardware.

Signed-off-by: Peter Jones <pjones at redhat.com>
---
 anaconda | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/anaconda b/anaconda
index a982214..e5715fc 100755
--- a/anaconda
+++ b/anaconda
@@ -641,6 +641,13 @@ def prompt_for_ssh():
     else:
         stdoutLog.info(_("Please ssh install@<host> to continue installation."))
 
+def cleanPStore():
+    try:
+        for root, dirs, files in os.walk("/sys/fs/pstore"):
+            for f in filter(lambda x: x.startswith("dump-"), files):
+                os.unlink("%s/%s" % (root,f))
+    except OSError:
+        pass
 
 if __name__ == "__main__":
     print "Starting installer, one moment..."
@@ -1011,6 +1018,8 @@ if __name__ == "__main__":
 
     if anaconda.rescue:
         rescue.doRescue(anaconda.intf, anaconda.rescue_mount, ksdata)
+    else:
+        cleanPStore()
 
     networkInitialize(ksdata)
     if not flags.dirInstall:
-- 
1.8.1.4



More information about the anaconda-patches mailing list