所以,为了防止dpkg安装后的console-UI(newt,snack,dialog)提示,你需要做如下的事情:
debconf-set-selections <<< 'mysql-server mysql-server/root_password password password' debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password verify_password' apt-get -y install mysql-server
谢谢。
注意
它看起来像设置这个variables是采取默认的解决scheme:
DEBIAN_FRONTEND=noninteractive
这将使用默认参数重新configuration您的软件包:
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure [package name]
这将显示您在安装软件包时设置的参数:
debconf-show [package name]
这将输出你在安装包时设置的参数,格式化为在debconf-set-selections加载:
debconf-get-selections | grep '^[package name]'
据我所知,你不能显示你没有安装的包的参数, 如果不使用noninteractive选项重新configuration软件包,则无法显示默认参数。 您可能需要使用容器进行testing。