Score:1

Non interactive configuration of a package

de flag

I'm trying automatically answer yes to Activate sysstat's cron job? in the sysstat package.

I tried this but it does not work :

$ debconf-show sysstat 2>/dev/null | grep sysstat/enable
* sysstat/enable: false
$ echo sysstat sysstat/enable boolean true | sudo debconf-set-selections
$ debconf-show sysstat 2>/dev/null | grep sysstat/enable
* sysstat/enable: true
$ sudo dpkg-reconfigure -f noninteractive sysstat
$ debconf-show sysstat 2>/dev/null | grep sysstat/enable
* sysstat/enable: false
$ sar
Cannot open /var/log/sysstat/sa04: No such file or directory
Please check if data collecting is enabled

Am I missing something ?

Score:1
jp flag

I am not a debconf expert, but in the source it appears that when sysstat gets (re)configured it will set the sysstat/enable debconf value based on the contents of /etc/default/sysstat.

The file /etc/default/sysstat gets created by the sysstat postinst script.

Therefore, I believe that you could set the debconf value before installing sysstat and it will work. However, if sysstat has been installed already then you need to modify (or delete) /etc/default/sysstat before running dpkg-reconfigure.

SebMa avatar
de flag
In that case, I guess my `debconf-set-selections` command is useless.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.