带有 debconf 预选的软件包
我想创建一个依赖于 mysql-server 的包,并将密码设置为自己随机生成的字符串,以防服务器尚未安装。 我不想让用户输入密码,并且我很高兴从 debconf 文件中获取当前密码。
但是我如何保证我的包在安装 mysql-server
包之前预设了 mysql-server-5.1/root_password
呢? mysql-server
被列为我的包的依赖项。
I'd like to create a package which will depend on mysql-server and set the password to its own randomly generated string in case the server is not installed yet.
I don't want to have the user put in the password and I'm happy to get the current password from the debconf's file.
But how can I guarantee that my package presets mysql-server-5.1/root_password
before the mysql-server
package is installed? mysql-server
is listed as a dependency of my package.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能保证这一点。事实上,它保证完全按照相反的方向工作。来自 http://www.debian.org/doc/debian-policy/ ch-relationships.html:
最好的办法是在正确安装 MySQL 后让您的软件包正常工作——如果您确实需要该功能,可以通过重置密码来实现。
You cannot guarantee that. In fact, it is guaranteed to work exactly the other direction. From http://www.debian.org/doc/debian-policy/ch-relationships.html:
Your best bet is to make your package work after MySQL is properly installed--possibly by resetting the password, if you really need that functionality.