mirror of
https://github.com/bohanyang/debi.git
synced 2026-09-26 22:16:11 +00:00
Add hold option
This commit is contained in:
@@ -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 <string>` 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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user