コード例 #1
0
ファイル: kickstart.py プロジェクト: rvykydal/anaconda
    def execute(self):
        if anaconda_logging.logger.loglevel == anaconda_logging.DEFAULT_LEVEL:
            # not set from the command line
            level = anaconda_logging.logLevelMap[self.level]
            anaconda_logging.logger.loglevel = level
            # set log level for the "anaconda" root logger
            anaconda_logging.setHandlersLevel(get_anaconda_root_logger(), level)
            # set log level for the storage logger
            anaconda_logging.setHandlersLevel(storage_log, level)

        if anaconda_logging.logger.remote_syslog is None and len(self.host) > 0:
            # not set from the command line, ok to use kickstart
            remote_server = self.host
            if self.port:
                remote_server = "%s:%s" % (self.host, self.port)
            anaconda_logging.logger.updateRemote(remote_server)
コード例 #2
0
    def execute(self):
        if anaconda_logging.logger.loglevel == anaconda_logging.DEFAULT_LEVEL:
            # not set from the command line
            level = anaconda_logging.logLevelMap[self.level]
            anaconda_logging.logger.loglevel = level
            # set log level for the "anaconda" root logger
            anaconda_logging.setHandlersLevel(get_anaconda_root_logger(),
                                              level)

        if anaconda_logging.logger.remote_syslog is None and len(
                self.host) > 0:
            # not set from the command line, ok to use kickstart
            remote_server = self.host
            if self.port:
                remote_server = "%s:%s" % (self.host, self.port)
            anaconda_logging.logger.updateRemote(remote_server)
コード例 #3
0
def setup_logging_from_kickstart(data):
    """Configure logging according to the kickstart.

    :param data: kickstart data
    """
    level = data.logging.level
    host = data.logging.host
    port = data.logging.port

    if anaconda_logging.logger.loglevel == anaconda_logging.DEFAULT_LEVEL:
        # not set from the command line
        level = anaconda_logging.logLevelMap[level]
        anaconda_logging.logger.loglevel = level
        # set log level for the "anaconda" root logger
        anaconda_logging.setHandlersLevel(get_anaconda_root_logger(), level)

    if anaconda_logging.logger.remote_syslog is None and len(host) > 0:
        # not set from the command line, ok to use kickstart
        remote_server = host
        if port:
            remote_server = "%s:%s" % (host, port)
        anaconda_logging.logger.updateRemote(remote_server)
コード例 #4
0
#
import os
from subprocess import TimeoutExpired

from pyanaconda.core.configuration.anaconda import conf
from pyanaconda.core.util import startProgram
from pyanaconda.core.constants import ANACONDA_BUS_ADDR_FILE, ANACONDA_CONFIG_TMP, \
    ANACONDA_BUS_CONF_FILE, DBUS_ANACONDA_SESSION_ADDRESS
from pyanaconda.core.dbus import DBus
from dasbus.constants import DBUS_FLAG_NONE
from pyanaconda.modules.common.constants.services import BOSS

from pyanaconda.anaconda_loggers import get_anaconda_root_logger
from pyanaconda.modules.common.task import sync_run_task

log = get_anaconda_root_logger()

__all__ = ["AnacondaDBusLauncher"]


class AnacondaDBusLauncher(object):
    """Class for launching the Anaconda DBus modules."""

    DBUS_LAUNCH_BIN = "dbus-daemon"

    def __init__(self):
        self._dbus_daemon_process = None
        self._log_file = None
        self._bus_address = None

    @property