Add constant for archiso mountpoint (#4377)
This commit is contained in:
parent
37159dcb6d
commit
a8d265184c
|
|
@ -36,6 +36,7 @@ from archinstall.lib.models.device import (
|
|||
)
|
||||
from archinstall.lib.models.users import Password
|
||||
from archinstall.lib.output import debug, error, info, log
|
||||
from archinstall.lib.pathnames import ARCHISO_MOUNTPOINT
|
||||
|
||||
|
||||
class DeviceHandler:
|
||||
|
|
@ -62,8 +63,6 @@ class DeviceHandler:
|
|||
devices = getAllDevices()
|
||||
devices.extend(self.get_loop_devices())
|
||||
|
||||
archiso_mountpoint = Path('/run/archiso/airootfs')
|
||||
|
||||
for device in devices:
|
||||
dev_lsblk_info = find_lsblk_info(device.path, all_lsblk_info)
|
||||
|
||||
|
|
@ -75,7 +74,7 @@ class DeviceHandler:
|
|||
continue
|
||||
|
||||
# exclude archiso loop device
|
||||
if dev_lsblk_info.mountpoint == archiso_mountpoint:
|
||||
if dev_lsblk_info.mountpoint == ARCHISO_MOUNTPOINT:
|
||||
continue
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
from pathlib import Path
|
||||
from typing import Final
|
||||
|
||||
from archinstall.lib.linux_path import LPath
|
||||
|
||||
ARCHISO_MOUNTPOINT: Final = Path('/run/archiso/airootfs')
|
||||
PACMAN_CONF: Final = LPath('/etc/pacman.conf')
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import secrets
|
||||
import string
|
||||
from pathlib import Path
|
||||
|
||||
from archinstall.lib.output import FormattedOutput
|
||||
from archinstall.lib.pathnames import ARCHISO_MOUNTPOINT
|
||||
|
||||
|
||||
def running_from_iso() -> bool:
|
||||
|
|
@ -12,7 +12,7 @@ def running_from_iso() -> bool:
|
|||
Returns True if /run/archiso/airootfs is a mount point (ISO mode).
|
||||
Returns False if running from installed system (host mode) for host-to-target install.
|
||||
"""
|
||||
return Path('/run/archiso/airootfs').is_mount()
|
||||
return ARCHISO_MOUNTPOINT.is_mount()
|
||||
|
||||
|
||||
def generate_password(length: int = 64) -> str:
|
||||
|
|
|
|||
Loading…
Reference in New Issue