Пример #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
Пример #2
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(util.getSysroot() + "/root", os.X_OK):
            try:
                dest = util.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, util.getSysroot())

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

        util.ipmi_report(IPMI_FAILED)
Пример #3
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(conf.target.system_root + "/root", os.X_OK):
            try:
                dest = conf.target.system_root + "/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, conf.target.system_root)

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

        util.ipmi_report(IPMI_FAILED)