--version to supersede --suite, restrict bpo

This commit is contained in:
Bohan Yang
2021-08-01 20:17:26 +08:00
parent b82cd0023c
commit 24a1ff77f7
2 changed files with 22 additions and 8 deletions
+2 -1
View File
@@ -103,7 +103,8 @@ Otherwise, you can run this command to revert all changes made by the script:
* `--dns '8.8.8.8 8.8.4.4'` (Default IPv6 DNS: `2001:4860:4860::8888 2001:4860:4860::8844`)
* `--hostname <string>` FQDN hostname (includes the domain name), e.g. `server1.example.com`
* `--network-console` Enable the network console of the installer. `ssh installer@ip` to connect
* `--suite buster` Choose the version to install: `buster` or `stable` for 10, `bullseye` or `testing` for 11, `stretch` or `oldstable` for 9, `sid` or `unstable`
* `--version 10` Supports: `9`, `10`, `11`, `stretch`, `buster`, `bullseye`
* `--suite buster` **For normal cases, please use `--version` instead.** e.g. `stretch`, `buster`, `bullseye`, `sid`, `oldstable`, `stable`, `testing`, `unstable`
* `--release-d-i` d-i (Debian Installer) for the released versions: 10 (buster) and 9 (stretch)
* `--daily-d-i` Use latest daily build of d-i (Debian Installer) for the unreleased versions: 11 (bullseye) and sid (unstable)
* `--mirror-protocol http` or `https` or `ftp`
+19 -6
View File
@@ -152,13 +152,26 @@ while [ $# -gt 0 ]; do
--network-console)
network_console=true
;;
--version)
case $2 in
9|stretch)
suite=stretch
;;
10|buster)
suite=buster
;;
11|bullseye)
suite=bullseye
daily_d_i=true
esac
shift
;;
--suite)
suite=$2
[ "$2" = 'bullseye' ] ||
[ "$2" = 'testing' ] ||
[ "$2" = 'sid' ] ||
[ "$2" = 'unstable' ] &&
case $2 in
bullseye|testing|sid|unstable)
daily_d_i=true
esac
shift
;;
--release-d-i)
@@ -326,8 +339,8 @@ done
}
[ "$bpo_kernel" = true ] && {
[ "$suite" = sid ] || [ "$suite" = unstable ] &&
err 'Backports kernel is not available for sid/unstable distribution'
[ "$suite" != buster ] && [ "$suite" != stretch ] &&
err 'Backports kernel is only available for 10 (buster) and 9 (stretch)'
install="$kernel/$suite-backports $install"
}