Bohan Yang 2 years ago
parent
commit
005754ffe8
1 changed files with 3 additions and 13 deletions
  1. 3 13
      debi.sh

+ 3 - 13
debi.sh

@@ -111,10 +111,10 @@ set_mirror_proxy() {
 
 
 set_security_archive() {
 set_security_archive() {
     case $suite in
     case $suite in
-        buster|oldoldstable|bullseye|oldstable)
+        buster|oldoldstable)
             security_archive="$suite/updates"
             security_archive="$suite/updates"
             ;;
             ;;
-        bookworm|stable|trixie|testing)
+        bullseye|oldstable|bookworm|stable|trixie|testing)
             security_archive="$suite-security"
             security_archive="$suite-security"
             ;;
             ;;
         sid|unstable)
         sid|unstable)
@@ -502,15 +502,6 @@ done
 [ -n "$authorized_keys_url" ] && ! download "$authorized_keys_url" /dev/null &&
 [ -n "$authorized_keys_url" ] && ! download "$authorized_keys_url" /dev/null &&
 err "Failed to download SSH authorized public keys from \"$authorized_keys_url\""
 err "Failed to download SSH authorized public keys from \"$authorized_keys_url\""
 
 
-non_free_firmware_available=false
-case $suite in
-    bookworm|stable|trixie|testing|sid|unstable)
-        non_free_firmware_available=true
-        ;;
-    *)
-        apt_non_free_firmware=false
-esac
-
 apt_components=main
 apt_components=main
 [ "$apt_contrib" = true ] && apt_components="$apt_components contrib"
 [ "$apt_contrib" = true ] && apt_components="$apt_components contrib"
 [ "$apt_non_free" = true ] && apt_components="$apt_components non-free"
 [ "$apt_non_free" = true ] && apt_components="$apt_components non-free"
@@ -780,14 +771,13 @@ $save_preseed << EOF
 
 
 # Apt setup
 # Apt setup
 
 
+d-i apt-setup/non-free-firmware boolean $apt_non_free_firmware
 d-i apt-setup/contrib boolean $apt_contrib
 d-i apt-setup/contrib boolean $apt_contrib
 d-i apt-setup/non-free boolean $apt_non_free
 d-i apt-setup/non-free boolean $apt_non_free
 d-i apt-setup/enable-source-repositories boolean $apt_src
 d-i apt-setup/enable-source-repositories boolean $apt_src
 d-i apt-setup/services-select multiselect $apt_services
 d-i apt-setup/services-select multiselect $apt_services
 EOF
 EOF
 
 
-[ "$non_free_firmware_available" = true ] && echo "d-i apt-setup/non-free-firmware boolean $apt_non_free_firmware" | $save_preseed
-
 # If not sid/unstable
 # If not sid/unstable
 [ -n "$security_archive" ] && {
 [ -n "$security_archive" ] && {
     $save_preseed << EOF
     $save_preseed << EOF