def __init__(self, root="/", ip=None, name=None, password="", vncconnecthost="", vncconnectport="", log_file="/tmp/vncserver.log", pw_file="/tmp/vncpassword", timeout=constants.X_TIMEOUT): self.root = root self.ip = ip self.name = name self.password = password self.vncconnecthost = vncconnecthost self.vncconnectport = vncconnectport self.log_file = log_file self.pw_file = pw_file self.timeout = timeout self.connxinfo = None self.anaconda = None self.log = get_stdout_logger() self.desktop = _("%(productName)s %(productVersion)s installation")\ % {'productName': product.productName, 'productVersion': product.productVersion}
def __init__(self, root="/", ip=None, name=None, password="", vncconnecthost="", vncconnectport="", log_file="/tmp/vncserver.log", pw_file="/tmp/vncpassword"): self.root = root self.ip = ip self.name = name self.password = password self.vncconnecthost = vncconnecthost self.vncconnectport = vncconnectport self.log_file = log_file self.pw_file = pw_file self.connxinfo = None self.anaconda = None self.log = get_stdout_logger() self.desktop = _("%(productName)s %(productVersion)s installation")\ % {'productName': product.productName, 'productVersion': product.productVersion}
# ANY WARRANTY expressed or implied, including the implied warranties of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. You should have received a copy of the # GNU General Public License along with this program; if not, write to the # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. Any Red Hat trademarks that are incorporated in the # source code or documentation are not subject to the GNU General Public # License and may only be used or replicated with the express permission of # Red Hat, Inc. # from pyanaconda.core.configuration.anaconda import conf from pyanaconda.core.i18n import _ from pyanaconda.anaconda_loggers import get_stdout_logger, get_storage_logger, get_packaging_logger stdout_log = get_stdout_logger() from pyanaconda.anaconda_loggers import get_module_logger log = get_module_logger(__name__) import sys import time import os from pyanaconda.core import util, constants from pyanaconda import product from pyanaconda import anaconda_logging from pyanaconda import network from pyanaconda import safe_dbus from pyanaconda import kickstart
from pyanaconda.core.configuration.anaconda import conf conf.set_from_opts(opts) # Set up logging as early as possible. from pyanaconda import anaconda_logging from pyanaconda import anaconda_loggers anaconda_logging.init(write_to_journal=conf.target.is_hardware) anaconda_logging.logger.setupVirtio(opts.virtiolog) # Load the remaining configuration after a logging is set up. conf.set_from_product(opts.product_name, opts.variant_name) conf.set_from_files() conf.set_from_opts(opts) log = anaconda_loggers.get_main_logger() stdout_log = anaconda_loggers.get_stdout_logger() if os.geteuid() != 0: stdout_log.error("anaconda must be run as root.") sys.exit(1) # check if input kickstart should be saved if flags.nosave_input_ks: log.warning( "Input kickstart will not be saved to the installed system due to the nosave option." ) util.touch('/tmp/NOSAVE_INPUT_KS') # check if logs should be saved if flags.nosave_logs: log.warning(
# import os import sys from glob import glob from tempfile import mkstemp import threading from pyanaconda import addons from pyanaconda.core.constants import DisplayModes from pyanaconda.core import constants from pyanaconda.dbus.launcher import AnacondaDBusLauncher from pyanaconda.payload.source import SourceFactory, PayloadSourceTypeUnrecognized from pyanaconda.anaconda_loggers import get_stdout_logger stdoutLog = get_stdout_logger() from pyanaconda.anaconda_loggers import get_module_logger log = get_module_logger(__name__) class Anaconda(object): def __init__(self): self._display_mode = None self._interactive_mode = True self.gui_startup_failed = False self._intf = None self.ksdata = None self.methodstr = None self.additional_repos = None self.opts = None
(opts, depr) = parse_arguments(boot_cmdline=flags.cmdline) from pyanaconda.core.configuration.anaconda import conf conf.set_from_opts(opts) # Set up logging as early as possible. from pyanaconda import anaconda_logging from pyanaconda import anaconda_loggers anaconda_logging.init(write_to_journal=conf.target.is_hardware) anaconda_logging.logger.setupVirtio(opts.virtiolog) from pyanaconda import network network.setup_ifcfg_log() log = anaconda_loggers.get_main_logger() stdout_log = anaconda_loggers.get_stdout_logger() if os.geteuid() != 0: stdout_log.error("anaconda must be run as root.") sys.exit(1) # check if input kickstart should be saved if flags.nosave_input_ks: log.warning("Input kickstart will not be saved to the installed system due to the nosave option.") util.touch('/tmp/NOSAVE_INPUT_KS') # check if logs should be saved if flags.nosave_logs: log.warning("Installation logs will not be saved to the installed system due to the nosave option.") util.touch('/tmp/NOSAVE_LOGS')