Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdff11f0d0 | ||
|
|
730ae083c4 |
@@ -193,20 +193,16 @@ notice() {
|
||||
# STEP 1: KEYBOARD LAYOUT
|
||||
|
||||
keyboard_form() {
|
||||
# The Ctrl+C hint sits directly under the header (no blank line between),
|
||||
# matching the disk-overwrite screen's unencrypted offer. Ctrl+C on the first
|
||||
# screen is the hidden entry into deferred provisioning; $1 is "true" only for that first
|
||||
# invocation, so the review-loop re-edit can't flip a user install into it.
|
||||
local allow_defer_provisioning="${1:-false}"
|
||||
# Ctrl+C is the hidden entry into deferred provisioning, offered on every
|
||||
# visit: the user step unwinds back here and nothing is on disk yet. Callers
|
||||
# re-check defer_provisioning after this returns.
|
||||
local status
|
||||
|
||||
while true; do
|
||||
clear_logo
|
||||
echo
|
||||
say "Let's setup your machine..."
|
||||
if $allow_defer_provisioning; then
|
||||
say --foreground 8 "Press Ctrl+C to prepare this machine for another owner."
|
||||
fi
|
||||
say --foreground 8 "Press Ctrl+C to prepare this machine for another owner."
|
||||
echo
|
||||
|
||||
omarchy_prompt_keyboard && status=0 || status=$?
|
||||
@@ -215,7 +211,7 @@ keyboard_form() {
|
||||
# Esc means "back", and nothing precedes the first screen, so re-ask.
|
||||
((status == OMARCHY_FORM_BACK)) && continue
|
||||
|
||||
if $allow_defer_provisioning && ((status == OMARCHY_FORM_SIGNAL)); then
|
||||
if ((status == OMARCHY_FORM_SIGNAL)); then
|
||||
if confirm_prepare_for_another_owner; then
|
||||
defer_provisioning=true
|
||||
return 0
|
||||
@@ -266,6 +262,8 @@ user_form() {
|
||||
omarchy_prompt_timezone || return $?
|
||||
}
|
||||
|
||||
# Returns 0 on confirmed account details, or as soon as the keyboard screen
|
||||
# arms deferred provisioning.
|
||||
user_step() {
|
||||
local status
|
||||
|
||||
@@ -277,6 +275,7 @@ user_step() {
|
||||
# keeps its long-standing behaviour of ending the install.
|
||||
((status == OMARCHY_FORM_BACK)) || abort
|
||||
keyboard_form
|
||||
$defer_provisioning && return 0
|
||||
continue
|
||||
fi
|
||||
|
||||
@@ -296,6 +295,7 @@ Keyboard,$keyboard" |
|
||||
break
|
||||
else
|
||||
keyboard_form
|
||||
$defer_provisioning && return 0
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -938,7 +938,7 @@ confirm_disk_overwrite() {
|
||||
# Decide what and how to install: sets install_target (full_disk|free_space),
|
||||
# install_target and encrypt_installation. Nothing is written to disk yet —
|
||||
# the user step runs between this and the execution below. (deferred provisioning never
|
||||
# reaches here; it's armed by Ctrl+C on the first screen and goes straight to
|
||||
# reaches here; it's armed by Ctrl+C on the keyboard screen and goes straight to
|
||||
# disk selection.)
|
||||
select_installation() {
|
||||
local full_disk_only
|
||||
@@ -992,7 +992,14 @@ wait_for_stable_terminal
|
||||
|
||||
greeter
|
||||
|
||||
keyboard_form true
|
||||
keyboard_form
|
||||
|
||||
# Normal install: keyboard (loaded above, so the LUKS passphrase is typed under
|
||||
# the right layout) → user → disk → install mode. The user step can unwind to
|
||||
# the keyboard screen and arm deferral there, hence the second check.
|
||||
if ! $defer_provisioning; then
|
||||
user_step
|
||||
fi
|
||||
|
||||
if $defer_provisioning; then
|
||||
# Deferred provisioning: no user setup, and the keyboard is deferred to the machine's first
|
||||
@@ -1018,10 +1025,6 @@ if $defer_provisioning; then
|
||||
done
|
||||
install_target="full_disk"
|
||||
else
|
||||
# Normal install: keyboard (done above) → user → disk → install mode. The
|
||||
# keyboard chosen above is already loaded, so the LUKS passphrase entered in
|
||||
# the user step is typed under the right layout.
|
||||
user_step
|
||||
disk_form
|
||||
select_installation
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user