From f135d776f8d5e2f2db61431595218b9acf385220 Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Sat, 24 Oct 2026 02:16:19 +0200 Subject: [PATCH] fix: package upgrades no longer ask the configuration questions. --- README.md | 4 ++-- debian-package/debian/changelog | 9 +++++++++ debian-package/debian/config | 6 ++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 77ec6c3..78331e1 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,8 @@ that deploy a router on Azure or GCP. `/etc/vpn-router/vpn-router.json` is JSON, mode 0600, and is created on first install. It is managed with `ucf`, so it is yours to edit: a later `dpkg-reconfigure` applies the answers -given and asks before touching anything you altered by hand, and an upgrade leaves the file as -it is and asks nothing. Settings the file leaves out take their defaults when it is read, so a +given and asks before touching anything you altered by hand, and an upgrade asks no questions +and leaves the file as it is. Settings the file leaves out take their defaults when it is read, so a file written by cloud-init or by hand needs only the settings that differ. A complete example is installed at `/usr/share/doc/vpn-router/vpn-router.json.example`. diff --git a/debian-package/debian/changelog b/debian-package/debian/changelog index 45609d5..563709d 100644 --- a/debian-package/debian/changelog +++ b/debian-package/debian/changelog @@ -1,3 +1,12 @@ +vpn-router (0.5.9-1) unstable; urgency=medium + + fix: package upgrades no longer ask the configuration questions. + + * The configuration questions are asked only on a fresh installation and + by dpkg-reconfigure. + + -- Slawomir Koszewski Sat, 24 Oct 2026 21:00:00 +0200 + vpn-router (0.5.8-1) unstable; urgency=medium fix: an upgrade keeps the configuration and asks nothing. diff --git a/debian-package/debian/config b/debian-package/debian/config index 5850d50..7851968 100755 --- a/debian-package/debian/config +++ b/debian-package/debian/config @@ -2,6 +2,12 @@ set -e . /usr/share/debconf/confmodule +# An upgrade (configure with the old version) asks nothing; vpn-router.json holds the +# configuration, and dpkg-reconfigure asks the questions again. +if [ "$1" = "configure" ] && [ -n "$2" ]; then + exit 0 +fi + # Every question has a default, so a non-interactive install with nothing # preseeded completes without prompting. The defaults are platform "none" and # mode "manual", which together mean: install the files, configure nothing.