[Boot/Shutdown] 每次关机都提示Unattended Upgrades Shutdown
Tofloor
poster avatar
小小怪下士
deepin
2021-11-24 05:25
Author

我该怎么设置才能让这个不显示???

图片.png

Reply Favorite View the author
All Replies
littlebat
deepin
2021-11-24 17:23
#1

我碰到过。https://askubuntu.com/questions/878630/apt-unattended-upgrades-stalls-shutdown

可能这个 BUG 又回归了。

apt_pkg.config.find_b("Unattended-Upgrade::InstallOnShutdown", False):

修改为:

apt_pkg.config.find_b("Unattended-Upgrade::InstallOnShutdown", false):

不过,在Deepin 中相关代码应该换了行:

299 and apt_pkg.config.find_b(
300 "Unattended-Upgrade::InstallOnShutdown", False))

"False" 换成 “false”就行

Reply View the author
thepoy
deepin
2021-11-24 17:34
#2
littlebat

我碰到过。https://askubuntu.com/questions/878630/apt-unattended-upgrades-stalls-shutdown

可能这个 BUG 又回归了。

apt_pkg.config.find_b("Unattended-Upgrade::InstallOnShutdown", False):

修改为:

apt_pkg.config.find_b("Unattended-Upgrade::InstallOnShutdown", false):

不过,在Deepin 中相关代码应该换了行:

299 and apt_pkg.config.find_b(
300 "Unattended-Upgrade::InstallOnShutdown", False))

"False" 换成 “false”就行

python的 False关键字首字母必须大写,改成小写的 false肯定会触发语法错误,运行这个脚本时因语法错误异常退出,如果是想通过这种方式避免上述问题,你觉得改 false是一个好的方案吗?

Reply View the author
littlebat
deepin
2021-11-24 19:12
#3
thepoy

python的 False关键字首字母必须大写,改成小写的 false肯定会触发语法错误,运行这个脚本时因语法错误异常退出,如果是想通过这种方式避免上述问题,你觉得改 false是一个好的方案吗?

没仔细研究过,也是那个贴子给的方法,照着做就解决问题了。

可能是一种歪打正着。b.jpg

Reply View the author
littlebat
deepin
2021-11-24 19:16
#4

后面也有人提到是 systemd 的问题。难道 Deepin 的 systemd 重新引入了这个BUG?

截图_选择区域_20211124111517.jpg

Reply View the author
小小怪下士
deepin
2021-11-24 20:37
#5
littlebat

没仔细研究过,也是那个贴子给的方法,照着做就解决问题了。

可能是一种歪打正着。b.jpg

我看csdn上,有人给出了这个方案:

sudo vim /etc/apt/apt.conf.d/20auto-upgrades

修改APT::Periodic::Unattended-Upgrade的1改成0即可,1开开启自动更新,0为关闭自动更新

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "0";    //修改这里的1为0即可

修改完成之后重启一下,以后就没有了。

原文链接:https://blog.csdn.net/srbhll/article/details/107910343

Reply View the author
littlebat
deepin
2021-11-25 23:41
#6
It has been deleted!