Beispiel #1
0
 def _on_plugins_changed(self, _plugins, _name):
     implementation = self._get_status_icon_implementation()
     if not self._implementation or self._implementation != implementation:
         self._implementation = implementation
         pid = get_pid(get_lockfile('blueman-tray'))
         if pid:
             kill(pid, 'blueman-tray')
         launch('blueman-tray', icon_name='blueman', sn=False)
Beispiel #2
0
    def do_remove(self):
        dhcp_config, existing_subnet = self._read_dhcp_config()
        with open(DHCP_CONFIG_FILE, "w") as f:
            f.write(dhcp_config)

        if self.netconf.locked("dhcp"):
            if not self.pid:
                pid = read_pid_file("/var/run/dhcpd.pan1.pid")
            else:
                pid = self.pid

            if not kill(pid, 'dhcpd3') and not kill(pid, 'dhcpd'):
                logging.info("Stale dhcp lockfile found")
            self.netconf.unlock("dhcp")
Beispiel #3
0
    def do_remove(self):
        dhcp_config, existing_subnet = self._read_dhcp_config()
        with open(DHCP_CONFIG_FILE, "w") as f:
            f.write(dhcp_config)

        if self.netconf.locked("dhcp"):
            if not self.pid:
                pid = read_pid_file("/var/run/dhcpd.pan1.pid")
            else:
                pid = self.pid

            if not kill(pid, 'dhcpd3') and not kill(pid, 'dhcpd'):
                logging.info("Stale dhcp lockfile found")
            self.netconf.unlock("dhcp")
Beispiel #4
0
    def do_remove(self):
        if self.netconf.locked("dhcp"):
            if not self.pid:
                pid = read_pid_file("/var/run/dnsmasq.pan1.pid")
            else:
                pid = self.pid

            if not kill(pid, 'dnsmasq'):
                logging.info("Stale dhcp lockfile found")
            self.netconf.unlock("dhcp")
Beispiel #5
0
    def do_remove(self):
        if self.netconf.locked("dhcp"):
            if not self.pid:
                pid = read_pid_file("/var/run/dnsmasq.pan1.pid")
            else:
                pid = self.pid

            if not kill(pid, 'dnsmasq'):
                logging.info("Stale dhcp lockfile found")
            self.netconf.unlock("dhcp")
Beispiel #6
0
 def on_devices(self):
     lockfile = get_lockfile('blueman-manager')
     pid = get_pid(lockfile)
     if not lockfile or not kill(pid, 'blueman-manager'):
         launch("blueman-manager", None, False, "blueman",
                _("Device Manager"))
Beispiel #7
0
 def _on_plugins_changed(self, _plugins, _name):
     implementation = self.GetStatusIconImplementation()
     if not self._implementation or self._implementation != implementation:
         self._implementation = implementation
         kill(get_pid(get_lockfile('blueman-tray')), 'blueman-tray')
         launch('blueman-tray', icon_name='blueman', sn=False)
 def on_devices(self):
     lockfile = get_lockfile('blueman-manager')
     pid = get_pid(lockfile)
     if not lockfile or not kill(pid, 'blueman-manager'):
         launch("blueman-manager", None, False, "blueman", _("Device Manager"))
Beispiel #9
0
 def _on_plugins_changed(self, _plugins, _name):
     implementation = self._get_status_icon_implementation()
     if not self._implementation or self._implementation != implementation:
         self._implementation = implementation
         kill(get_pid(get_lockfile('blueman-tray')), 'blueman-tray')
         launch('blueman-tray', icon_name='blueman', sn=False)
Beispiel #10
0
 def on_devices(self):
     lockfile = get_lockfile('blueman-manager')
     pid = get_pid(lockfile)
     if not pid or not kill(pid, 'blueman-manager'):
         launch("blueman-manager", name=_("Device Manager"))