I’m scripting some sys admin tasks in Debian which require the installation of packages like Postfix. I don’t want it to prompt me with questions, so I knew I had to set the priority to something higher for this specific package (i.e. temporarily). There doesn’t appear to be a way to pass this to an apt-get
command (which was a little disappointing) but debconf can set it system wide under /var/cache/debconf/config.dat
, but that’s, well, ugly.
Turns out there’s an environment variable you can set to achieve what I want, DEBIAN_PRIORITY. So exporting this variable and unsetting it post install will do the trick, but I still think apt-get -p critical install postfix
would be better 🙂
-c
2 thoughts on “Changing priorities”
Hi Chris, clever solution! I had to do something similar, but with a more stubborn package that would always prompt for information. I had to preseed the debconf database to get around this. This kind of approach would probably also help you, though it might not be as simple. Thought it might be worth linking here for reference anyway: http://log.openmonkey.com/post/38097969/enabling-a-non-interactive-install-of-blackdowns
Cheers!
Hi Tim, thanks for the link. I don’t know about “clever”, but it works 🙂
-c