Beispiel #1
0
    def apply(self):
        """Apply all of our settings."""
        self._update_network_data()
        log.debug("apply ksdata %s", self.data.network)

        if self._apply:
            self._apply = False
            if ANACONDA_ENVIRON in flags.environs:
                from pyanaconda.payload import payloadMgr
                payloadMgr.restartThread(self.storage, self.data, self.payload,
                                         self.instclass, checkmount=False)
Beispiel #2
0
    def apply(self):
        """Apply all of our settings."""
        self._update_network_data()
        log.debug("apply ksdata %s", self.data.network)

        if self._apply:
            self._apply = False
            if ANACONDA_ENVIRON in flags.environs:
                from pyanaconda.payload import payloadMgr
                payloadMgr.restartThread(self.storage, self.data, self.payload,
                                         self.instclass, checkmount=False)
Beispiel #3
0
    def unset_source(self):
        """Unset an already selected source method.

        Unset the source in kickstart and notify the payload so that it can correctly
        release all related resources (unmount iso files, drop caches, etc.).
        """
        self._clean_hdd_iso()
        self.data.method.method = None
        payloadMgr.restartThread(self.storage, self.data, self.payload, self.instclass, checkmount=False)   # pylint: disable=no-member
        threadMgr.wait(constants.THREAD_PAYLOAD_RESTART)
        threadMgr.wait(constants.THREAD_PAYLOAD)
Beispiel #4
0
    def unset_source(self):
        """Unset an already selected source method.

        Unset the source in kickstart and notify the payload so that it can correctly
        release all related resources (unmount iso files, drop caches, etc.).
        """
        self._clean_hdd_iso()
        self.data.method.method = None
        payloadMgr.restartThread(self.storage, self.data, self.payload, self.instclass, checkmount=False)   # pylint: disable=no-member
        threadMgr.wait(constants.THREAD_PAYLOAD_RESTART)
        threadMgr.wait(constants.THREAD_PAYLOAD)
    def apply(self):
        """ Execute the selections made. """
        # If askmethod was provided on the command line, entering the source
        # spoke wipes that out.
        if flags.askmethod:
            flags.askmethod = False

        # if we had any errors, e.g. from a previous attempt to set the source,
        # clear them at this point
        self._error = False

        payloadMgr.restartThread(self.storage, self.data, self.payload, self.instclass,
                                 checkmount=False)
    def apply(self):
        """ Execute the selections made. """
        # If askmethod was provided on the command line, entering the source
        # spoke wipes that out.
        if flags.askmethod:
            flags.askmethod = False

        # if we had any errors, e.g. from a previous attempt to set the source,
        # clear them at this point
        self._error = False

        payloadMgr.restartThread(self.storage, self.data, self.payload, self.instclass,
                                 checkmount=False)
Beispiel #7
0
    def apply(self):
        """Apply all of our settings."""
        # Inform network module that device configurations might have been changed
        # and we want to generate kickstart from device configurations
        # (persistent NM / ifcfg configuration), instead of using original kickstart.
        self._network_module.proxy.NetworkDeviceConfigurationChanged()

        (valid, error) = network.is_valid_hostname(self.hostname)
        if valid:
            self._network_module.proxy.SetHostname(self.hostname)
        else:
            self.errors.append(_("Host name is not valid: %s") % error)
            self.hostname = self._network_module.proxy.Hostname

        if self._apply:
            self._apply = False
            if ANACONDA_ENVIRON in flags.environs:
                from pyanaconda.payload import payloadMgr
                payloadMgr.restartThread(self.storage,
                                         self.data,
                                         self.payload,
                                         checkmount=False)
Beispiel #8
0
    if ksdata.displaymode.displayMode != pykickstart_constants.DISPLAY_MODE_CMDLINE or flags.debug:
        from pyanaconda import exception
        anaconda.mehConfig = exception.initExceptionHandling(anaconda)

    # add our own additional signal handlers
    signal.signal(signal.SIGUSR1, lambda signum, frame:
                  exception.test_exception_handling())
    signal.signal(signal.SIGUSR2, lambda signum, frame: anaconda.dumpState())
    atexit.register(exitHandler, ksdata.reboot, anaconda.storage)

    from pyanaconda import exception
    anaconda.mehConfig = exception.initExceptionHandling(anaconda)

    # Fallback to default for interactive or for a kickstart with no installation method.
    fallback = not (flags.automatedInstall and ksdata.method.method)
    payloadMgr.restartThread(anaconda.storage, ksdata, anaconda.payload, anaconda.instClass, fallback=fallback)

    # initialize the geolocation singleton
    geoloc.init_geolocation(geoloc_option=opts.geoloc,
                            options_override=opts.geoloc_use_with_ks,
                            install_class_override=anaconda.instClass.use_geolocation_with_kickstart)

    # start geolocation lookup if enabled
    if geoloc.geoloc.enabled:
        geoloc.geoloc.refresh()

    # setup ntp servers and start NTP daemon if not requested otherwise
    if can_touch_runtime_system("start chronyd"):
        if anaconda.ksdata.timezone.ntpservers:
            pools, servers = ntp.internal_to_pools_and_servers(anaconda.ksdata.timezone.ntpservers)
            ntp.save_servers_to_config(pools, servers)
Beispiel #9
0
    # add our own additional signal handlers
    signal.signal(signal.SIGUSR1, lambda signum, frame:
                  exception.test_exception_handling())
    signal.signal(signal.SIGUSR2, lambda signum, frame: anaconda.dumpState())
    atexit.register(exitHandler, ksdata.reboot, anaconda.storage)

    from pyanaconda import exception
    anaconda.mehConfig = exception.initExceptionHandling(anaconda)

    # add additional repositories from the cmdline to kickstart data
    anaconda.add_additional_repositories_to_ksdata()

    # Fallback to default for interactive or for a kickstart with no installation method.
    fallback = not (flags.automatedInstall and ksdata.method.method)
    payloadMgr.restartThread(anaconda.storage, ksdata, anaconda.payload, anaconda.instClass, fallback=fallback)

    # initialize the geolocation singleton
    geoloc.init_geolocation(geoloc_option=opts.geoloc, options_override=opts.geoloc_use_with_ks)

    # start geolocation lookup if enabled
    if geoloc.geoloc.enabled:
        geoloc.geoloc.refresh()

    # setup ntp servers and start NTP daemon if not requested otherwise
    if conf.system.can_set_time_synchronization:
        kickstart_ntpservers = timezone_proxy.NTPServers

        if kickstart_ntpservers:
            pools, servers = ntp.internal_to_pools_and_servers(kickstart_ntpservers)
            ntp.save_servers_to_config(pools, servers)