def run(self):
        self.window.show()
        rc = self.window.run()
        self.window.hide()

        #OK clicked
        if rc == 1:
            new_servers = list()

            for row in self._serversStore:
                #if server checked
                if row[2]:
                    new_servers.append(row[0])

            if flags.can_touch_runtime_system("save NTP servers configuration"):
                ntp.save_servers_to_config(new_servers)
                iutil.restart_service(NTP_SERVICE)

        #Cancel clicked, window destroyed...
        else:
            self._epoch_lock.acquire()
            self._epoch += 1
            self._epoch_lock.release()

            self._initialize_store_from_config()

        return rc
Exemplo n.º 2
0
    def run(self):
        self.window.show()
        rc = self.window.run()
        self.window.hide()

        #OK clicked
        if rc == 1:
            new_servers = list()

            for row in self._serversStore:
                #if server checked
                if row[2]:
                    new_servers.append(row[0])

            if flags.can_touch_runtime_system(
                    "save NTP servers configuration"):
                ntp.save_servers_to_config(new_servers)
                iutil.restart_service(NTP_SERVICE)

        #Cancel clicked, window destroyed...
        else:
            self._epoch_lock.acquire()
            self._epoch += 1
            self._epoch_lock.release()

            self._initialize_store_from_config()

        return rc
Exemplo n.º 3
0
 def restartSyslog(self):
     # Import here instead of at the module level to avoid an import loop
     from pyanaconda.iutil import restart_service
     restart_service("rsyslog")
Exemplo n.º 4
0
 def restartSyslog(self):
     # Import here instead of at the module level to avoid an import loop
     from pyanaconda.iutil import restart_service
     restart_service("rsyslog")