wireless support. duh.
This commit is contained in:
16
aif/network/__init__.py
Normal file
16
aif/network/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
||||
try:
|
||||
from . import _common
|
||||
except ImportError:
|
||||
pass # GI isn't supported, so we don't even use a fallback.
|
||||
|
||||
# TODO: use DBus interface for systemd but fallback to subprocess?
|
||||
# http://0pointer.net/blog/the-new-sd-bus-api-of-systemd.html
|
||||
# https://www.youtube.com/watch?v=ZUX9Fx8Rwzg
|
||||
# https://www.youtube.com/watch?v=lBQgMGPxqNo
|
||||
# https://github.com/facebookincubator/pystemd has some unit/service examples
|
||||
# try:
|
||||
# from . import networkd
|
||||
# except ImportError:
|
||||
# from . import networkd_fallback as networkd
|
||||
|
||||
from . import netctl
|
||||
13
aif/network/_common.py
Normal file
13
aif/network/_common.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import gi
|
||||
gi.require_version('NM', '2.0')
|
||||
from gi.repository import NM, GLib
|
||||
|
||||
NM.ensure_init([None])
|
||||
|
||||
|
||||
def addBDPlugin(plugin_name):
|
||||
plugins = NM.get_available_plugin_names()
|
||||
plugins.append(plugin_name)
|
||||
plugins = list(set(plugins)) # Deduplicate
|
||||
spec = NM.plugin_specs_from_names(plugins)
|
||||
return(NM.ensure_init(spec))
|
||||
0
aif/network/netctl.py
Normal file
0
aif/network/netctl.py
Normal file
4
aif/network/networkd.py
Normal file
4
aif/network/networkd.py
Normal file
@@ -0,0 +1,4 @@
|
||||
import ipaddress
|
||||
import socket
|
||||
|
||||
|
||||
0
aif/network/networkd_fallback.py
Normal file
0
aif/network/networkd_fallback.py
Normal file
0
aif/network/networkmanager.py
Normal file
0
aif/network/networkmanager.py
Normal file
0
aif/network/networkmanager_fallback.py
Normal file
0
aif/network/networkmanager_fallback.py
Normal file
Reference in New Issue
Block a user