Browse Source

Prepare for Debian 11 release (#21)

Bohan Yang 4 years ago
parent
commit
27f8cd26cf
2 changed files with 21 additions and 18 deletions
  1. 6 6
      README.md
  2. 15 12
      debi.sh

+ 6 - 6
README.md

@@ -2,7 +2,7 @@
 
 
 [General description in English ↓](#introduction)
 [General description in English ↓](#introduction)
 
 
-## VPS 网络重装 Debian 10 脚本
+## VPS 网络重装 Debian 11 脚本
 
 
 **暂不支持 Oracle Linux 作为原系统。创建新机器时请选择 Ubuntu 20.04 或 18.04 系统模板。**
 **暂不支持 Oracle Linux 作为原系统。创建新机器时请选择 Ubuntu 20.04 或 18.04 系统模板。**
 
 
@@ -38,7 +38,7 @@ sudo shutdown -r now
 
 
 ## Introduction
 ## Introduction
 
 
-This script is written to reinstall a VPS/virtual machine to minimal Debian 10.
+This script is written to reinstall a VPS/virtual machine to minimal Debian 11.
 
 
 ## Should Work On
 ## Should Work On
 
 
@@ -104,10 +104,10 @@ 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
- * `--version 11` Supports: `9`, `10`, `11`, `stretch`, `buster`, `bullseye`
- * `--suite bullseye` **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 version: 11 (bullseye), sid (unstable)
+ * `--version 11` Supports: `9`, `10`, `11`, `12`
+ * `--suite bullseye` **For normal cases, please use `--version` instead.** e.g. `stable`, `testing`, `sid`
+ * `--release-d-i` d-i (Debian Installer) for the released versions: 11 (bullseye), 10 (buster) and 9 (stretch)
+ * `--daily-d-i` Use latest daily build of d-i (Debian Installer) for the unreleased version: 12 (bookworm), sid (unstable)
  * `--mirror-protocol http` or `https` or `ftp`
  * `--mirror-protocol http` or `https` or `ftp`
  * `--https` alias to `--mirror-protocol https`
  * `--https` alias to `--mirror-protocol https`
  * `--mirror-host deb.debian.org`
  * `--mirror-host deb.debian.org`

+ 15 - 12
debi.sh

@@ -76,10 +76,10 @@ download() {
 
 
 set_security_archive() {
 set_security_archive() {
     case $suite in
     case $suite in
-        stretch|oldstable|buster|stable)
+        stretch|oldoldstable|buster|oldstable)
             security_archive="$suite/updates"
             security_archive="$suite/updates"
             ;;
             ;;
-        bullseye|testing)
+        bullseye|stable|bookworm|testing)
             security_archive="$suite-security"
             security_archive="$suite-security"
             ;;
             ;;
         sid|unstable)
         sid|unstable)
@@ -92,10 +92,10 @@ set_security_archive() {
 
 
 set_daily_d_i() {
 set_daily_d_i() {
     case $suite in
     case $suite in
-        stretch|oldstable|buster|stable)
+        stretch|oldoldstable|buster|oldstable|bullseye|stable)
             daily_d_i=false
             daily_d_i=false
             ;;
             ;;
-        bullseye|testing|sid|unstable)
+        bookworm|testing|sid|unstable)
             daily_d_i=true
             daily_d_i=true
             ;;
             ;;
         *)
         *)
@@ -111,15 +111,18 @@ set_suite() {
 
 
 set_debian_version() {
 set_debian_version() {
     case $1 in
     case $1 in
-        9|stretch|oldstable)
+        9|stretch|oldoldstable)
             set_suite stretch
             set_suite stretch
             ;;
             ;;
-        10|buster|stable)
+        10|buster|oldstable)
             set_suite buster
             set_suite buster
             ;;
             ;;
-        11|bullseye|testing)
+        11|bullseye|stable)
             set_suite bullseye
             set_suite bullseye
             ;;
             ;;
+        12|bookworm|testing)
+            set_suite bookworm
+            ;;
         sid|unstable)
         sid|unstable)
             set_suite sid
             set_suite sid
             ;;
             ;;
@@ -130,14 +133,14 @@ set_debian_version() {
 
 
 has_cloud_kernel() {
 has_cloud_kernel() {
     case $suite in
     case $suite in
-        stretch|oldstable)
+        stretch|oldoldstable)
             [ "$architecture" = amd64 ] && [ "$bpo_kernel" = true ] && return
             [ "$architecture" = amd64 ] && [ "$bpo_kernel" = true ] && return
             ;;
             ;;
-        buster|stable)
+        buster|oldstable)
             [ "$architecture" = amd64 ] && return
             [ "$architecture" = amd64 ] && return
             [ "$architecture" = arm64 ] && [ "$bpo_kernel" = true ] && return
             [ "$architecture" = arm64 ] && [ "$bpo_kernel" = true ] && return
             ;;
             ;;
-        bullseye|testing|sid|unstable)
+        bullseye|stable|bookworm|testing|sid|unstable)
             [ "$architecture" = amd64 ] || [ "$architecture" = arm64 ] && return
             [ "$architecture" = amd64 ] || [ "$architecture" = arm64 ] && return
     esac
     esac
 
 
@@ -150,7 +153,7 @@ has_cloud_kernel() {
 
 
 has_backports() {
 has_backports() {
     case $suite in
     case $suite in
-        stretch|oldstable|buster|stable|bullseye|testing) return
+        stretch|oldoldstable|buster|oldstable|bullseye|stable|bookworm|testing) return
     esac
     esac
 
 
     echo "\nWarning: No backports kernel is available for $suite.\nContinuing with the default...\n" 1>&2
     echo "\nWarning: No backports kernel is available for $suite.\nContinuing with the default...\n" 1>&2
@@ -165,7 +168,7 @@ gateway=
 dns='8.8.8.8 8.8.4.4'
 dns='8.8.8.8 8.8.4.4'
 hostname=
 hostname=
 network_console=false
 network_console=false
-set_debian_version 10
+set_debian_version 11
 mirror_protocol=http
 mirror_protocol=http
 mirror_host=deb.debian.org
 mirror_host=deb.debian.org
 mirror_directory=/debian
 mirror_directory=/debian