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>
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
# 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)
(