debian: 国内使用清华源

This commit is contained in:
bin456789
2023-11-01 22:22:30 +08:00
parent fe12b0f26e
commit 9be484fc54
2 changed files with 9 additions and 6 deletions

View File

@ -67,8 +67,8 @@ d-i finish-install/reboot_in_progress note
# B.5.1. 安装过程中运行用户命令
d-i preseed/early_command string \
wget http://www.cloudflare.com/cdn-cgi/trace -O- | grep -x 'loc=CN' && hostname=ftp.cn.debian.org || hostname=deb.debian.org; \
debconf-set mirror/http/hostname $hostname
hostname="$(grep -o 'extra\.deb_hostname=[^ ]*' /proc/cmdline | cut -d= -f2)"; \
debconf-set mirror/http/hostname "$hostname"
d-i partman/early_command string \
debconf-set partman-auto/disk "$(list-devices disk | head -n1)"; \