mirror of
https://github.com/bin456789/reinstall.git
synced 2025-02-20 05:33:07 +08:00
使用 --ci 安装 Debian 时 CN 环境修改为国内源
This commit is contained in:
parent
2e1702e5e0
commit
4afbd5a2fe
6
trans.sh
6
trans.sh
@ -2767,8 +2767,14 @@ EOF
|
||||
# 获取当前开启的 Components, 后面要用
|
||||
if [ -f $os_dir/etc/apt/sources.list.d/debian.sources ]; then
|
||||
comps=$(grep ^Components: $os_dir/etc/apt/sources.list.d/debian.sources | head -1 | cut -d' ' -f2-)
|
||||
if is_in_china; then
|
||||
sed -i 's|[a-zA-Z.-]*\.debian\.org|mirror.nju.edu.cn|g' $os_dir/etc/apt/mirrors/debian.list $os_dir/etc/apt/mirrors/debian-security.list
|
||||
fi
|
||||
else
|
||||
comps=$(grep '^deb ' $os_dir/etc/apt/sources.list | head -1 | cut -d' ' -f4-)
|
||||
if is_in_china; then
|
||||
sed -i 's|[a-zA-Z.-]*\.debian\.org|mirror.nju.edu.cn|g' $os_dir/etc/apt/sources.list
|
||||
fi
|
||||
fi
|
||||
|
||||
# EOL 处理
|
||||
|
Loading…
x
Reference in New Issue
Block a user