一旦使用过 debconf-set-selections 值,它是否会自动从 debconf 数据库中删除它们?

一旦使用过 debconf-set-selections 值,它是否会自动从 debconf 数据库中删除它们?

考虑以下打字稿:

# export DEBIAN_FRONTEND="noninteractive"

# sudo debconf-set-selections <<< "mysql-community-server mysql-community-server/remove-data-dir boolean true"

# echo GET mysql-community-server/remove-data-dir | debconf-communicate
0 true

# apt purge mysql-*
...

# echo GET mysql-community-server/remove-data-dir | debconf-communicate
10 mysql-community-server/remove-data-dir doesn't exist

# sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password 123456"

# sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password 123456"

# echo GET mysql-server/root_password | debconf-communicate
0 123456

# apt install mysql-server-5.6
...

# echo GET mysql-server/root_password | debconf-communicate
0

那么,debconf-set-selections这是自动完成的吗?还是安装脚本会执行此操作?还有其他选择吗?

答案1

回答我自己的问题,包通常会在清除它们自己时清除它们拥有的问题。至于mysql的密码,postinst脚本会在安装后明确清除它,以避免它留在磁盘上。更多信息这里这里

相关内容