commit
0488c93a50
|
|
@ -3,9 +3,7 @@ from .general import sys_command
|
||||||
from .networking import list_interfaces, enrichIfaceTypes
|
from .networking import list_interfaces, enrichIfaceTypes
|
||||||
|
|
||||||
def hasWifi():
|
def hasWifi():
|
||||||
if 'WIRELESS' in enrichIfaceTypes(list_interfaces().values()).values():
|
return 'WIRELESS' in enrichIfaceTypes(list_interfaces().values()).values()
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def hasUEFI():
|
def hasUEFI():
|
||||||
return os.path.isdir('/sys/firmware/efi')
|
return os.path.isdir('/sys/firmware/efi')
|
||||||
|
|
@ -19,18 +17,12 @@ def graphicsDevices():
|
||||||
return cards
|
return cards
|
||||||
|
|
||||||
def hasNvidiaGraphics():
|
def hasNvidiaGraphics():
|
||||||
if [x for x in graphicsDevices() if 'nvidia' in x]:
|
return any('nvidia' in x for x in graphicsDevices())
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def hasAmdGraphics():
|
def hasAmdGraphics():
|
||||||
if [x for x in graphicsDevices() if 'amd' in x]:
|
return any('amd' in x for x in graphicsDevices())
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def hasIntelGraphics():
|
def hasIntelGraphics():
|
||||||
if [x for x in graphicsDevices() if 'intel' in x]:
|
return any('intel' in x for x in graphicsDevices())
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
# TODO: Add more identifiers
|
# TODO: Add more identifiers
|
||||||
|
|
|
||||||
|
|
@ -26,15 +26,11 @@ class Ini():
|
||||||
return result
|
return result
|
||||||
|
|
||||||
class Systemd(Ini):
|
class Systemd(Ini):
|
||||||
def __init__(self, *args, **kwargs):
|
"""
|
||||||
"""
|
Placeholder class to do systemd specific setups.
|
||||||
Placeholder class to do systemd specific setups.
|
"""
|
||||||
"""
|
|
||||||
super(Systemd, self).__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
class Networkd(Systemd):
|
class Networkd(Systemd):
|
||||||
def __init__(self, *args, **kwargs):
|
"""
|
||||||
"""
|
Placeholder class to do systemd-network specific setups.
|
||||||
Placeholder class to do systemd-network specific setups.
|
"""
|
||||||
"""
|
|
||||||
super(Networkd, self).__init__(*args, **kwargs)
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue