mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
debian: 使用 cloudflare 判断是否国内
This commit is contained in:
parent
382feb49c7
commit
990a8d4855
@ -1,3 +1,4 @@
|
||||
# https://www.debian.org/releases/stable/amd64/apbs04.zh-cn.html
|
||||
# B.4.1. 本地化
|
||||
d-i debian-installer/locale string en_US
|
||||
d-i keyboard-configuration/xkb-keymap select us
|
||||
@ -59,7 +60,7 @@ d-i finish-install/reboot_in_progress note
|
||||
|
||||
# B.5.1. 安装过程中运行用户命令
|
||||
d-i preseed/early_command string \
|
||||
wget https://geoip.fedoraproject.org/city -O - | grep -w CHN && hostname=ftp.cn.debian.org || hostname=deb.debian.org; \
|
||||
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
|
||||
|
||||
d-i partman/early_command string \
|
||||
|
Loading…
x
Reference in New Issue
Block a user