Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add new parameter "--kexec-extra-flags" #332

Merged
merged 3 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Options:
do not reboot after installation, allowing further customization of the target installation.
* --kexec <path>
use another kexec tarball to bootstrap NixOS
* --kexec-extra-flags
extra flags to add into the call to kexec, e.g. "--no-sync"
* --post-kexec-ssh-port <ssh_port>
after kexec is executed, use a custom ssh port to connect. Defaults to 22
* --copy-host-keys
Expand Down Expand Up @@ -65,6 +67,7 @@ step() {

here=$(dirname "${BASH_SOURCE[0]}")
kexec_url=""
kexec_extra_flags=""
enable_debug=""
maybe_reboot="sleep 6 && reboot"
nix_options=(
Expand Down Expand Up @@ -123,6 +126,10 @@ while [[ $# -gt 0 ]]; do
kexec_url=$2
shift
;;
--kexec-extra-flags)
kexec_extra_flags=$2
shift
;;
--post-kexec-ssh-port)
post_kexec_ssh_port=$2
shift
Expand Down Expand Up @@ -396,7 +403,7 @@ SSH
fi

ssh_ <<SSH
TMPDIR=/root/kexec setsid ${maybe_sudo} /root/kexec/kexec/run
TMPDIR=/root/kexec setsid ${maybe_sudo} /root/kexec/kexec/run --kexec-extra-flags "${kexec_extra_flags}"
SSH

# use the default SSH port to connect at this point
Expand Down
Loading