コード例 #1
0
ファイル: anaconda.py プロジェクト: mudler/anaconda
        ksdata.lang.seen = True

    # Setup the locale environment
    if ksdata.lang.seen:
        locale_option = ksdata.lang.lang
    else:
        locale_option = None
    localization.setup_locale_environment(locale_option,
                                          opts.display_mode != "g")

    # Now that LANG is set, do something with it
    localization.setup_locale(os.environ["LANG"], ksdata.lang,
                              opts.display_mode != "g")

    import blivet
    blivet.enable_installer_mode()

    # Initialize the network now, in case the display needs it
    from pyanaconda.network import networkInitialize, wait_for_connecting_NM_thread

    networkInitialize(ksdata)
    threadMgr.add(
        AnacondaThread(name=constants.THREAD_WAIT_FOR_CONNECTING_NM,
                       target=wait_for_connecting_NM_thread,
                       args=(ksdata, )))

    # initialize the screen access manager before launching the UI
    from pyanaconda import screen_access
    screen_access.initSAM()
    # try to open any existing config file
    # (might be created by pre-anaconda helper tools, injected during image
コード例 #2
0
ファイル: anaconda.py プロジェクト: Jakuje/anaconda
    if opts.lang:
        ksdata.lang.lang = opts.lang
        ksdata.lang.seen = True

    # Setup the locale environment
    if ksdata.lang.seen:
        locale_option = ksdata.lang.lang
    else:
        locale_option = None
    localization.setup_locale_environment(locale_option, opts.display_mode != "g")

    # Now that LANG is set, do something with it
    localization.setup_locale(os.environ["LANG"], ksdata.lang, opts.display_mode != "g")

    import blivet
    blivet.enable_installer_mode()

    # Initialize the network now, in case the display needs it
    from pyanaconda.network import networkInitialize, wait_for_connecting_NM_thread

    networkInitialize(ksdata)
    threadMgr.add(AnacondaThread(name=constants.THREAD_WAIT_FOR_CONNECTING_NM, target=wait_for_connecting_NM_thread, args=(ksdata,)))

    # now start the interface
    setupDisplay(anaconda, opts, addon_paths)
    if anaconda.gui_startup_failed:
        # we need to reinitialize the locale if GUI startup failed,
        # as we might now be in text mode, which might not be able to display
        # the characters from our current locale
        log.warning("reinitializing locale due to failed attempt to start the GUI")
        localization.setup_locale(os.environ["LANG"], ksdata.lang, anaconda.displayMode != "g")