--version to supersede --suite, restrict bpo

pull/20/head
Bohan Yang 4 years ago
parent b82cd0023c
commit 24a1ff77f7
  1. 3
      README.md
  2. 27
      debi.sh

@ -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`) * `--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` * `--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 * `--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) * `--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) * `--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` * `--mirror-protocol http` or `https` or `ftp`

@ -152,13 +152,26 @@ while [ $# -gt 0 ]; do
--network-console) --network-console)
network_console=true 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)
suite=$2 suite=$2
[ "$2" = 'bullseye' ] || case $2 in
[ "$2" = 'testing' ] || bullseye|testing|sid|unstable)
[ "$2" = 'sid' ] || daily_d_i=true
[ "$2" = 'unstable' ] && esac
daily_d_i=true
shift shift
;; ;;
--release-d-i) --release-d-i)
@ -326,8 +339,8 @@ done
} }
[ "$bpo_kernel" = true ] && { [ "$bpo_kernel" = true ] && {
[ "$suite" = sid ] || [ "$suite" = unstable ] && [ "$suite" != buster ] && [ "$suite" != stretch ] &&
err 'Backports kernel is not available for sid/unstable distribution' err 'Backports kernel is only available for 10 (buster) and 9 (stretch)'
install="$kernel/$suite-backports $install" install="$kernel/$suite-backports $install"
} }

Loading…
Cancel
Save