omarchy-iso-cleanup-disk: add --protected mode; adapter: doc pre-mount mount semantics
This commit is contained in:
2 files changed
+11
-1
No files matched your search
@@ -10,6 +10,13 @@
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
if [[ ${1:-} == --protected ]]; then
|
||||
target="${2:-}"
|
||||
[[ -n $target ]] || { echo "Usage: $0 --protected <target>" >&2; exit 1; }
|
||||
findmnt -R "$target" >/dev/null 2>&1 && umount -R "$target" || true
|
||||
exit 0
|
||||
fi
|
||||
|
||||
disk="${1:-}"
|
||||
[[ -n $disk && -b $disk ]] || { echo "Need a block device argument; got '$disk'" >&2; exit 1; }
|
||||
|
||||
|
||||
@@ -9,7 +9,10 @@ The canonical call sequence (mirrored from archinstall.scripts.guided.py) is:
|
||||
|
||||
FilesystemHandler(disk_config).perform_filesystem_operations()
|
||||
with Installer(mountpoint, disk_config, kernels=, silent=) as inst:
|
||||
inst.mount_ordered_layout()
|
||||
# guided.py:84-85 SKIPS this for DiskLayoutType.Pre_mount — pre-mounted
|
||||
# configs do their own mounting before the Installer context opens.
|
||||
if disk_config.config_type != DiskLayoutType.Pre_mount:
|
||||
inst.mount_ordered_layout()
|
||||
inst.sanity_check(offline=, skip_ntp=, skip_wkd=)
|
||||
inst.generate_key_files() # encrypted only
|
||||
inst.set_mirrors(handler, mirror_config, on_target=False)
|
||||
|
||||
Reference in new issue
Block a user