diff --git a/README.md b/README.md index 7fbca27..8279859 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ This script is written to reinstall a VPS/virtual machine to Debian 10 Buster. * `--no-upgrade` * `--eth` Disable *Consistent Network Device Naming* to get `eth0`, `eth1`, etc. back * `--bbr` Enable TCP BBR congestion control + * `--hold` Don't reboot or power off after installation * `--power-off` Power off after installation rather than reboot * `--architecture ` e.g. `amd64`, `i386`, `arm64`, `armhf`, etc. * `--boot-partition` Should be used if `/boot` directory is mounted from a dedicated partition like a LVM setup diff --git a/debi.sh b/debi.sh index 22ff777..2d219c1 100755 --- a/debi.sh +++ b/debi.sh @@ -58,6 +58,7 @@ install='ca-certificates libpam-systemd' upgrade= kernel_params= bbr=false +hold=false power_off=false architecture= boot_directory=/boot/ @@ -208,6 +209,9 @@ while [ $# -gt 0 ]; do --bbr) bbr=true ;; + --hold) + hold=true + ;; --power-off) power_off=true ;; @@ -511,9 +515,10 @@ $save_preseed << 'EOF' # Finishing up the installation -d-i finish-install/reboot_in_progress note EOF +[ "$hold" != true ] && echo 'd-i finish-install/reboot_in_progress note' | $save_preseed + [ "$bbr" = true ] && run_later '{ echo "net.core.default_qdisc=fq"; echo "net.ipv4.tcp_congestion_control=bbr"; } > /etc/sysctl.d/bbr.conf' [ -n "$late_command" ] && echo "d-i preseed/late_command string in-target bash -c '$late_command'" | $save_preseed