Browse Source

Daily d-i support

Bohan Yang 5 years ago
parent
commit
fb4603788d
2 changed files with 16 additions and 2 deletions
  1. 3 1
      README.md
  2. 13 1
      debi.sh

+ 3 - 1
README.md

@@ -98,7 +98,9 @@ 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`
+ * `--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`
+ * `--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`
  * `--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`

+ 13 - 1
debi.sh

@@ -81,6 +81,7 @@ dns='8.8.8.8 8.8.4.4'
 hostname=
 hostname=
 network_console=false
 network_console=false
 suite=buster
 suite=buster
+daily_d_i=false
 mirror_protocol=http
 mirror_protocol=http
 mirror_host=deb.debian.org
 mirror_host=deb.debian.org
 mirror_directory=/debian
 mirror_directory=/debian
@@ -153,8 +154,19 @@ while [ $# -gt 0 ]; do
             ;;
             ;;
         --suite)
         --suite)
             suite=$2
             suite=$2
+            [ "$2" = 'bullseye' ] ||
+            [ "$2" = 'testing' ] ||
+            [ "$2" = 'sid' ] ||
+            [ "$2" = 'unstable' ] &&
+            daily_d_i=true
             shift
             shift
             ;;
             ;;
+        --release-d-i)
+            daily_d_i=false
+            ;;
+        --daily-d-i)
+            daily_d_i=true
+            ;;
         --mirror-protocol)
         --mirror-protocol)
             mirror_protocol=$2
             mirror_protocol=$2
             shift
             shift
@@ -416,7 +428,6 @@ d-i mirror/$mirror_protocol/hostname string $mirror_host
 d-i mirror/$mirror_protocol/directory string $mirror_directory
 d-i mirror/$mirror_protocol/directory string $mirror_directory
 d-i mirror/$mirror_protocol/proxy string
 d-i mirror/$mirror_protocol/proxy string
 d-i mirror/suite string $suite
 d-i mirror/suite string $suite
-d-i mirror/udeb/suite string $suite
 EOF
 EOF
 
 
 [ "$account_setup" = true ] && {
 [ "$account_setup" = true ] && {
@@ -615,6 +626,7 @@ EOF
 save_grub_cfg='cat'
 save_grub_cfg='cat'
 [ "$dry_run" = false ] && {
 [ "$dry_run" = false ] && {
     base_url="$mirror_protocol://$mirror_host$mirror_directory/dists/$suite/main/installer-$architecture/current/images/netboot/debian-installer/$architecture"
     base_url="$mirror_protocol://$mirror_host$mirror_directory/dists/$suite/main/installer-$architecture/current/images/netboot/debian-installer/$architecture"
+    [ "$daily_d_i" = true ] && base_url="https://d-i.debian.org/daily-images/amd64/daily/netboot/debian-installer/$architecture"
     firmware_url="https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/$suite/current/firmware.cpio.gz"
     firmware_url="https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/$suite/current/firmware.cpio.gz"
 
 
     download "$base_url/linux" linux
     download "$base_url/linux" linux