From a7bc7e2b5d09c470be3e54aebb400175e88d4944 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sun, 27 Jan 2019 17:24:36 +0100 Subject: [PATCH] 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 --- debian/frr.postinst | 7 +++++-- debian/frr.preinst | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/debian/frr.postinst b/debian/frr.postinst index dac2fa0f05..505ff8eaf8 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 fe087c6a7c..0e10e39247 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) ( -- 2.39.5