修复postinst风险

This commit is contained in:
gfdgd xi 2022-12-17 09:51:11 +08:00
parent e13076d841
commit 1e1d3fb352

View File

@ -49,12 +49,18 @@ if [ `arch` != "x86_64" ]; then
rm -rf /opt/apps/deepin-wine-runner/InstallNewWineHQ.sh
fi
# 到时候切换 gpg 源会方便很多
if [ -d /usr/share/deepin-installer ]; then
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FD6EEA1F20CD4B27 > /dev/null 2>&1 | true
if [ -r /etc/apt/sources.list.d/better-dde.list ]; then
if [ -d /usr/share/deepin-installer ]; then
# 用于修复 Deepin Community Live CD Install 版签名过期的问题
wget -P /tmp/gfdgd-xi-sources https://code.gitlink.org.cn/gfdgd_xi/gfdgd-xi-apt-mirrors/raw/branch/master/gpg.asc
rm -rfv /etc/apt/trusted.gpg.d/gfdgdxi-list.gpg | true
cp -v /tmp/gfdgd-xi-sources/gpg.asc.gpg /etc/apt/trusted.gpg.d/gfdgdxi-list.gpg
# 用于修复 2022.11.25 Better DDE 导致的 Deepin Community Live CD Install 版问题
sh -c 'echo "deb [trusted=yes] https://proposed-packages.deepin.com/dde-apricot unstable main contrib non-free" > /etc/apt/sources.list.d/deepin-unstable.list'
# 移除 Better DDE 源
rm -rfv /etc/apt/sources.list.d/better-dde.list
apt update > /dev/null 2>&1 | true
fi
fi
apt update > /dev/null 2>&1 | true
# 设置目录权限,让用户可读可写,方便后续删除组件
chmod 777 -R /opt/apps/deepin-wine-runner
# 向服务器返回安装数加1不显示内容且忽略错误