Последняя активность 6 months ago

Версия ffb4d72f09dc8eb6cc2266c4ed32053b68ed1877

frr-migration.sh Исходник
1# cp /usr/share/doc/quagga-core/examples/ospfd.conf.sample /etc/quagga/ospfd.conf && cp /usr/share/doc/quagga-core/examples/zebra.conf.sample /etc/quagga/zebra.conf && cp /usr/share/doc/quagga-core/examples/vtysh.conf.sample /etc/quagga/vtysh.conf
2QUAGGA_USRGRP="frr:frr"
3RELEASE="$(lsb_release -c -s)"
4SERVICES=$(grep quagga /lib/systemd/system/*.service | cut -f1 -d: | uniq);
5 [ ! -f "/etc/apt/sources.list.d/${RELEASE}-backports-cyconet.list" ] && \
6 printf "deb http://ftp.cyconet.org/debian ${RELEASE}-backports main non-free contrib\ndeb-src http://ftp.cyconet.org/debian ${RELEASE}-backports main non-free contrib\n" > /etc/apt/sources.list.d/${RELEASE}-backports-cyconet.list; \
7 apt update && \
8 apt-get install -t ${RELEASE}-backports -y frr; \
9 [ -f /etc/frr/frr.conf ] && mv /etc/frr/frr.conf /etc/frr/frr.conf.orig; \
10 for SERVICE in $SERVICES; do
11 DAEMON=$(basename -s .service $SERVICE);
12 cp -a /etc/quagga/$DAEMON.conf /etc/frr/;
13 sed -i "/^hostname/a log file \/var\/log\/frr\/$DAEMON.log" /etc/frr/$DAEMON.conf;
14 chown ${QUAGGA_USRGRP} /etc/frr/$DAEMON.conf;
15 sed -i "s/^$DAEMON=no/$DAEMON=yes/" /etc/frr/daemons;
16 done ; \
17 grep -E "^(hostname|password|log file|line)" /etc/frr/zebra.conf | sed s/zebra.log/staticd.log/g > /etc/frr/staticd.conf && \
18 grep "^ip route" /etc/frr/zebra.conf >> /etc/frr/staticd.conf && \
19 sed -i "/^ip route.*/d" /etc/frr/zebra.conf && \
20 [ -f /etc/frr/ospfd.conf ] && sed -i "s/ translate-candidate no-summary//" /etc/frr/ospfd.conf; \
21 chown ${QUAGGA_USRGRP} /etc/frr/staticd.conf && \
22 systemctl restart frr
23