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

Peter Jones pjones at redhat.com
Wed Apr 10 19:16:13 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>
---
 dracut/clean-pstore.sh | 13 +++++++++++++
 dracut/module-setup.sh |  1 +
 2 files changed, 14 insertions(+)
 create mode 100644 dracut/clean-pstore.sh

diff --git a/dracut/clean-pstore.sh b/dracut/clean-pstore.sh
new file mode 100644
index 0000000..6f7a85b
--- /dev/null
+++ b/dracut/clean-pstore.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ ! -d /sys/fs/pstore ]; then
+    return 0
+fi
+
+if getargbool 0 rescue inst.rescue emergency ; then
+    return 0
+fi
+
+rm -f /sys/fs/pstore/dump-*
+
+return 0
diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh
index 6743671..a58b3ec 100755
--- a/dracut/module-setup.sh
+++ b/dracut/module-setup.sh
@@ -23,6 +23,7 @@ install() {
     inst_hook cmdline 26 "$moddir/parse-anaconda-kickstart.sh"
     inst_hook cmdline 27 "$moddir/parse-anaconda-repo.sh"
     inst_hook cmdline 28 "$moddir/parse-anaconda-net.sh"
+    inst_hook pre-udev 29 "$moddir/clean-pstore.sh"
     inst_hook pre-udev 30 "$moddir/anaconda-modprobe.sh"
     inst_hook pre-udev 40 "$moddir/repo-genrules.sh"
     inst_hook pre-udev 40 "$moddir/kickstart-genrules.sh"
-- 
1.8.1.4



More information about the anaconda-patches mailing list