0

I am working on some bash scripts to configure various packages the way I need them. When installing Debian 'unattended-upgrades' normally one of the user intervention required is to run *user@hostname:~# dpkg-reconfigure -plow unattended-upgrades* to generate the /etc/apt/apt.conf.d/20auto-upgrades file contents.

I want to configure unattended-upgrades with the following string (from the Debian Wiki Unattended-upgrades page) :https://wiki.debian.org/UnattendedUpgrades suggests to use this "Or non-interactively by running:

echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections dpkg-reconfigure -f noninteractive unattended-upgrades

So, when I run my script containing this suggested string I am seeing this:

Unknown option: f
Usage: debconf-set-selections [-vcu] [file]
  -v, --verbose     verbose output
  -c, --checkonly   only check the input file format
  -u, --unseen      do not set the 'seen' flag when preseeding values

I am assuming that the error "f" mentioned is referencing the "-f" option within the Debian Wiki script string suggestion. When the script completes everything seems to be working as expected. 'Unattended-upgrades' has installed without user intervention.

Like everyone, when I create my various bash scripts my bash education is on going. So, being a newbie script writer my question is this, is there a better way to script this non-interaction install of unattended-upgrades than that suggested on the Debian wiki page? Should this "f" complaint concern me or should I just ignore the error?

0

1 Answer 1

0

I'm afraid you've misread the https://wiki.debian.org/UnattendedUpgrades instructions, and combined both commands into one.

Or non-interactively by running:

echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections

dpkg-reconfigure -f noninteractive unattended-upgrades

(source: https://wiki.debian.org/UnattendedUpgrades ; blank line added for clarity)

run echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections

and then run dpkg-reconfigure -f noninteractive unattended-upgrades

so from my reading, the first command is configuring your unattented-upgrades file, and the second is telling dpkg to use that file for the non-interactive frontend.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .