Example #1
0
    def _run_kickstart_scripts(self, dump_info):
        """Run the %traceback and %onerror kickstart scripts."""
        anaconda = dump_info.object

        try:
            util.runOnErrorScripts(anaconda.ksdata.scripts)
            kickstart.runTracebackScripts(anaconda.ksdata.scripts)
        # pylint: disable=bare-except
        except:
            pass
    def postWriteHook(self, dump_info):
        anaconda = dump_info.object

        # See if /mnt/sysimage is present and put exception there as well
        if os.access("/mnt/sysimage/root", os.X_OK):
            try:
                dest = "/mnt/sysimage/root/%s" % os.path.basename(self.exnFile)
                shutil.copyfile(self.exnFile, dest)
            except (shutil.Error, IOError):
                log.error("Failed to copy %s to /mnt/sysimage/root", self.exnFile)

        # run kickstart traceback scripts (if necessary)
        try:
            kickstart.runTracebackScripts(anaconda.ksdata.scripts)
        # pylint: disable-msg=W0702
        except:
            pass
    def postWriteHook(self, dump_info):
        anaconda = dump_info.object

        # See if /mnt/sysimage is present and put exception there as well
        if os.access("/mnt/sysimage/root", os.X_OK):
            try:
                dest = "/mnt/sysimage/root/%s" % os.path.basename(self.exnFile)
                shutil.copyfile(self.exnFile, dest)
            except (shutil.Error, IOError):
                log.error("Failed to copy %s to /mnt/sysimage/root",
                          self.exnFile)

        # run kickstart traceback scripts (if necessary)
        try:
            kickstart.runTracebackScripts(anaconda.ksdata.scripts)
        # pylint: disable-msg=W0702
        except:
            pass
Example #4
0
    def postWriteHook(self, dump_info):
        anaconda = dump_info.object

        # See if there is a /root present in the root path and put exception there as well
        if os.access(iutil.getSysroot() + "/root", os.X_OK):
            try:
                dest = iutil.getSysroot() + "/root/%s" % os.path.basename(self.exnFile)
                shutil.copyfile(self.exnFile, dest)
            except (shutil.Error, IOError):
                log.error("Failed to copy %s to %s/root", self.exnFile, iutil.getSysroot())

        # run kickstart traceback scripts (if necessary)
        try:
            kickstart.runTracebackScripts(anaconda.ksdata.scripts)
        # pylint: disable=bare-except
        except:
            pass

        iutil.ipmi_report(IPMI_FAILED)
    def postWriteHook(self, dump_info):
        anaconda = dump_info.object

        # See if there is a /root present in the root path and put exception there as well
        if os.access(iutil.getSysroot() + "/root", os.X_OK):
            try:
                dest = iutil.getSysroot() + "/root/%s" % os.path.basename(self.exnFile)
                shutil.copyfile(self.exnFile, dest)
            except (shutil.Error, IOError):
                log.error("Failed to copy %s to %s/root", self.exnFile, iutil.getSysroot())

        # run kickstart traceback scripts (if necessary)
        try:
            kickstart.runTracebackScripts(anaconda.ksdata.scripts)
        # pylint: disable=bare-except
        except:
            pass

        iutil.ipmi_report(IPMI_FAILED)