summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-01-27 17:24:36 +0100
committerDavid Lamparter <equinox@diac24.net>2019-02-19 21:34:09 +0100
commit4c3d9ff53a4fbcc9053063cb8b32920166341221 (patch)
treed678b4f0e5152ef248a553dc728fe1eac7c3b45a /debian
parenttools/tarsource.sh: deal with AC_INIT [] (diff)
downloadfrr-4c3d9ff53a4fbcc9053063cb8b32920166341221.tar.xz
frr-4c3d9ff53a4fbcc9053063cb8b32920166341221.zip
debian: extend comments on pre/postinst hooks
While originally created to support upgrading within non-official previous FRR packages, the same logic makes upgrading from Quagga configs more straightforward. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'debian')
-rw-r--r--debian/frr.postinst7
-rw-r--r--debian/frr.preinst8
2 files changed, 13 insertions, 2 deletions
diff --git a/debian/frr.postinst b/debian/frr.postinst
index dac2fa0f0..505ff8eaf 100644
--- a/debian/frr.postinst
+++ b/debian/frr.postinst
@@ -48,11 +48,14 @@ find \
fi
done
-# fix misconfigured vtysh.conf & frr.conf ownership set up by some inofficial
-# ("pre"-Debian) packages
+# fix misconfigured vtysh.conf & frr.conf ownership caused by config save
+# mishandling in earlier FRR (and Quagga) versions
find /etc/frr -maxdepth 1 \( -name vtysh.conf -o -name frr.conf \) \
-group frrvty -exec chgrp frr {} \;
+# more Quagga -> FRR upgrade smoothing. Not technically needed, but let's
+# at least do the straightforward pieces.
+
check_old_config() {
oldcfg="$1"
[ -r "$oldcfg" ] || return 0
diff --git a/debian/frr.preinst b/debian/frr.preinst
index fe087c6a7..0e10e3924 100644
--- a/debian/frr.preinst
+++ b/debian/frr.preinst
@@ -3,6 +3,14 @@ set -e
# bash is required since /etc/frr/daemons.conf used a bash array in some
# previous versions.
+# NOTE: this code exists specifically to make migrations from Quagga to
+# FRR easier. FRR is able to load most Quagga configurations, but the
+# config handling itself has changed with the move towards the "integrated"
+# /etc/frr/frr.conf approach instead of separate per-daemon config files.
+#
+# That said, with this in place there's a good chance users can use a
+# preexisting Quagga config with little hassle.
+
case "$1" in
install|upgrade)
(