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