Merging master into feature branch.
This commit is contained in:
commit
3f0a534374
|
|
@ -3,9 +3,7 @@ from .general import sys_command
|
|||
from .networking import list_interfaces, enrichIfaceTypes
|
||||
|
||||
def hasWifi():
|
||||
if 'WIRELESS' in enrichIfaceTypes(list_interfaces().values()).values():
|
||||
return True
|
||||
return False
|
||||
return 'WIRELESS' in enrichIfaceTypes(list_interfaces().values()).values()
|
||||
|
||||
def hasAMDCPU():
|
||||
if subprocess.check_output("lscpu | grep AMD", shell=True).strip().decode():
|
||||
|
|
@ -24,18 +22,12 @@ def graphicsDevices():
|
|||
return cards
|
||||
|
||||
def hasNvidiaGraphics():
|
||||
if [x for x in graphicsDevices() if 'nvidia' in x]:
|
||||
return True
|
||||
return False
|
||||
return any('nvidia' in x for x in graphicsDevices())
|
||||
|
||||
def hasAmdGraphics():
|
||||
if [x for x in graphicsDevices() if 'amd' in x]:
|
||||
return True
|
||||
return False
|
||||
return any('amd' in x for x in graphicsDevices())
|
||||
|
||||
def hasIntelGraphics():
|
||||
if [x for x in graphicsDevices() if 'intel' in x]:
|
||||
return True
|
||||
return False
|
||||
return any('intel' in x for x in graphicsDevices())
|
||||
|
||||
# TODO: Add more identifiers
|
||||
# TODO: Add more identifiers
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ class luks2():
|
|||
else:
|
||||
raise err
|
||||
|
||||
if b'Command successful.' not in b''.join(cmd_handle):
|
||||
raise DiskError(f'Could not encrypt volume "{partition.path}": {o}')
|
||||
if b'Command successful.' not in (cmd_output := b''.join(cmd_handle)):
|
||||
raise DiskError(f'Could not encrypt volume "{partition.path}": {cmd_output}')
|
||||
|
||||
return key_file
|
||||
|
||||
|
|
@ -126,4 +126,4 @@ class luks2():
|
|||
|
||||
def format(self, path):
|
||||
if (handle := sys_command(f"/usr/bin/cryptsetup -q -v luksErase {path}")).exit_code != 0:
|
||||
raise DiskError(f'Could not format {path} with {self.filesystem} because: {b"".join(handle)}')
|
||||
raise DiskError(f'Could not format {path} with {self.filesystem} because: {b"".join(handle)}')
|
||||
|
|
|
|||
|
|
@ -26,15 +26,11 @@ class Ini():
|
|||
return result
|
||||
|
||||
class Systemd(Ini):
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
Placeholder class to do systemd specific setups.
|
||||
"""
|
||||
super(Systemd, self).__init__(*args, **kwargs)
|
||||
"""
|
||||
Placeholder class to do systemd specific setups.
|
||||
"""
|
||||
|
||||
class Networkd(Systemd):
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
Placeholder class to do systemd-network specific setups.
|
||||
"""
|
||||
super(Networkd, self).__init__(*args, **kwargs)
|
||||
"""
|
||||
Placeholder class to do systemd-network specific setups.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ The way the library is invoked in module mode is limited to executing scripts un
|
|||
It's there for important to place any script or profile you wish to invoke in the examples folder prior to building and installing.
|
||||
|
||||
Pre-requisites
|
||||
-------------
|
||||
--------------
|
||||
|
||||
We'll assume you've followed the `installing.python.manual`_ method.
|
||||
We'll assume you've followed the :ref:`installing.python.manual` method.
|
||||
Before actually installing the library, you will need to place your custom installer-scripts under `./archinstall/examples/` as a python file.
|
||||
|
||||
More on how you create these in the next section.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ python-archinstall Documentation
|
|||
================================
|
||||
|
||||
| **python-archinstall** *(or, archinstall for short)* is a helper library to install Arch Linux and manage services, packages and other things.
|
||||
| It comes packaged with different pre-configured installers, such as the `Guided installation`_ installer.
|
||||
| It comes packaged with different pre-configured installers, such as the :ref:`guided <installing.guided>` installer.
|
||||
|
|
||||
| A demo can be viewed here: `https://www.youtube.com/watch?v=9Xt7X_Iqg6E <https://www.youtube.com/watch?v=9Xt7X_Iqg6E>`_ which uses the default guided installer.
|
||||
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ Default is :code:`Archinstall`
|
|||
The hostname in which the machine will identify itself on the local network.
|
||||
This step is optional, but a default hostname of `Archinstall` will be set if none is selected.
|
||||
|
||||
.. _root_password:
|
||||
|
||||
Root password
|
||||
-------------
|
||||
|
||||
|
|
@ -113,7 +115,7 @@ Super User (sudo)
|
|||
-----------------
|
||||
|
||||
.. warning::
|
||||
This step only applies if you correctly skipped the previous step :ref:`root_password`_ which also makes this step mandatory.
|
||||
This step only applies if you correctly skipped :ref:`the previous step <root_password>` which also makes this step mandatory.
|
||||
|
||||
If the previous step was skipped, and only if it is skipped.
|
||||
This step enables you to create a :code:`sudo` enabled user with a password.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ But the library can be installed manually as well.
|
|||
This is not required if you're running archinstall on a pre-built ISO. The installation is only required if you're creating your own scripted installations.
|
||||
|
||||
Using pacman
|
||||
----------
|
||||
------------
|
||||
|
||||
Archinstall is on the `official repositories <https://wiki.archlinux.org/index.php/Official_repositories>`_.
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ Or as a user module:
|
|||
|
||||
Which will allow you to start using the library.
|
||||
|
||||
.. _installing.python.manual
|
||||
.. _installing.python.manual:
|
||||
|
||||
Manual installation
|
||||
-------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue