Rework mount point argument (#3041)
This commit is contained in:
parent
d5c5b60d5c
commit
459b84b6fe
|
|
@ -77,7 +77,7 @@ def define_arguments() -> None:
|
|||
parser.add_argument("--dry-run", "--dry_run", action="store_true",
|
||||
help="Generates a configuration file and then exits instead of performing an installation")
|
||||
parser.add_argument("--script", default="guided", nargs="?", help="Script to run for installation", type=str)
|
||||
parser.add_argument("--mount-point", "--mount_point", nargs="?", type=str,
|
||||
parser.add_argument("--mount-point", "--mount_point", default=Path("/mnt/archinstall"), nargs="?", type=Path,
|
||||
help="Define an alternate mount point for installation")
|
||||
parser.add_argument("--skip-ntp", action="store_true", help="Disables NTP checks during installation", default=False)
|
||||
parser.add_argument("--debug", action="store_true", default=False, help="Adds debug info into the log")
|
||||
|
|
@ -266,8 +266,6 @@ def load_config() -> None:
|
|||
|
||||
def post_process_arguments(args: dict[str, Any]) -> None:
|
||||
storage['arguments'] = args
|
||||
if mountpoint := args.get('mount_point', None):
|
||||
storage['MOUNT_POINT'] = Path(mountpoint)
|
||||
|
||||
if args.get('debug', False):
|
||||
warn(f"Warning: --debug mode will write certain credentials to {storage['LOG_PATH']}/{storage['LOG_FILE']}!")
|
||||
|
|
|
|||
|
|
@ -272,9 +272,6 @@ class ArchConfigHandler:
|
|||
if args.config is None:
|
||||
args.silent = False
|
||||
|
||||
if args.mount_point is not None:
|
||||
storage['MOUNT_POINT'] = Path(args.mount_point)
|
||||
|
||||
if args.debug:
|
||||
warn(f"Warning: --debug mode will write certain credentials to {storage['LOG_PATH']}/{storage['LOG_FILE']}!")
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class DiskLayoutConfiguration:
|
|||
mods = device_handler.detect_pre_mounted_mods(path)
|
||||
device_modifications.extend(mods)
|
||||
|
||||
storage['MOUNT_POINT'] = path
|
||||
storage['arguments']['mount_point'] = path
|
||||
|
||||
config.mountpoint = path
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ def select_disk_config(
|
|||
|
||||
mods = disk.device_handler.detect_pre_mounted_mods(path)
|
||||
|
||||
storage['MOUNT_POINT'] = path
|
||||
storage['arguments']['mount_point'] = path
|
||||
|
||||
return disk.DiskLayoutConfiguration(
|
||||
config_type=disk.DiskLayoutType.Pre_mount,
|
||||
|
|
|
|||
|
|
@ -11,5 +11,4 @@ from typing import Any
|
|||
storage: dict[str, Any] = {
|
||||
'LOG_PATH': Path('/var/log/archinstall'),
|
||||
'LOG_FILE': Path('install.log'),
|
||||
'MOUNT_POINT': Path('/mnt/archinstall'),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ def guided() -> None:
|
|||
)
|
||||
|
||||
fs_handler.perform_filesystem_operations()
|
||||
perform_installation(archinstall.storage.get('MOUNT_POINT', Path('/mnt')))
|
||||
perform_installation(archinstall.arguments.get('mount_point', Path('/mnt')))
|
||||
|
||||
|
||||
guided()
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ def minimal() -> None:
|
|||
)
|
||||
|
||||
fs_handler.perform_filesystem_operations()
|
||||
perform_installation(archinstall.storage.get('MOUNT_POINT', Path('/mnt')))
|
||||
perform_installation(archinstall.arguments.get('mount_point', Path('/mnt')))
|
||||
|
||||
|
||||
minimal()
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ def only_hd() -> None:
|
|||
)
|
||||
|
||||
fs_handler.perform_filesystem_operations()
|
||||
perform_installation(archinstall.storage.get('MOUNT_POINT', Path('/mnt')))
|
||||
perform_installation(archinstall.arguments.get('mount_point', Path('/mnt')))
|
||||
|
||||
|
||||
only_hd()
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class SwissMainMenu(GlobalMenu):
|
|||
archinstall.arguments[item.key] = item.action(item.value)
|
||||
|
||||
perform_installation(
|
||||
archinstall.storage.get('MOUNT_POINT', Path('/mnt')),
|
||||
archinstall.arguments.get('mount_point', Path('/mnt')),
|
||||
self._execution_mode
|
||||
)
|
||||
case ExecutionMode.Only_OS:
|
||||
|
|
@ -87,7 +87,7 @@ class SwissMainMenu(GlobalMenu):
|
|||
break
|
||||
|
||||
perform_installation(
|
||||
archinstall.storage.get('MOUNT_POINT', Path('/mnt')),
|
||||
archinstall.arguments.get('mount_point', Path('/mnt')),
|
||||
self._execution_mode
|
||||
)
|
||||
case _:
|
||||
|
|
@ -266,7 +266,7 @@ def swiss() -> None:
|
|||
)
|
||||
|
||||
fs_handler.perform_filesystem_operations()
|
||||
perform_installation(archinstall.storage.get('MOUNT_POINT', Path('/mnt')), mode)
|
||||
perform_installation(archinstall.arguments.get('mount_point', Path('/mnt')), mode)
|
||||
|
||||
|
||||
swiss()
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ def _guided() -> None:
|
|||
)
|
||||
|
||||
fs_handler.perform_filesystem_operations()
|
||||
perform_installation(archinstall.storage.get('MOUNT_POINT', Path('/mnt')))
|
||||
perform_installation(archinstall.arguments.get('mount_point', Path('/mnt')))
|
||||
|
||||
|
||||
_guided()
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ def _minimal() -> None:
|
|||
)
|
||||
|
||||
fs_handler.perform_filesystem_operations()
|
||||
perform_installation(archinstall.storage.get('MOUNT_POINT', Path('/mnt')))
|
||||
perform_installation(archinstall.arguments.get('mount_point', Path('/mnt')))
|
||||
|
||||
|
||||
_minimal()
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ def _only_hd() -> None:
|
|||
)
|
||||
|
||||
fs_handler.perform_filesystem_operations()
|
||||
perform_installation(archinstall.storage.get('MOUNT_POINT', Path('/mnt')))
|
||||
perform_installation(archinstall.arguments.get('mount_point', Path('/mnt')))
|
||||
|
||||
|
||||
_only_hd()
|
||||
|
|
|
|||
Loading…
Reference in New Issue