options
- `frr.readme`:
Returns this document `cat README_usage.md`
+- `frr.set`:
+ Allows to enable `FPM` module. See FPM section below
and for debugging defined at this time (May get removed later - do not
depend on them). These are mainly intended to debug the Snap
These settings require either a reboot or a manual configuration with
`sysctl` as well.
+FPM Module
+----------
+The `frr.set` allows to turn FPM module on or off.
+
+ frr.set fpm {disable|protobuf|netlink}
+
+ Disables FPM or enables FPM with selected mode
+
+By default, the FPM module is disabled, but installed with netlink and
+protobuf support. To enable the FPM module, use the `frr.set fpm protobuf`
+or `frr.set fpm netlink` command. The command will only enable the mode
+for the next restart of zebra. Please reboot or restart zebra after
+changing the mode to become effective.
+
FAQ
---
- frr.vtysh displays `--MORE--` on long output. How to suppress this?
install -D -m 0755 pimd-service $(DESTDIR)/bin/
install -D -m 0755 ldpd-service $(DESTDIR)/bin/
install -D -m 0755 nhrpd-service $(DESTDIR)/bin/
+ install -D -m 0755 set-options $(DESTDIR)/bin/
--- /dev/null
+#!/bin/sh
+
+set -e
+
+case $1 in
+ fpm)
+ case $2 in
+ disable)
+ rm -f $SNAP_DATA/fpm.conf
+ echo "FPM module disabled. Please restart FRR"
+ ;;
+ protobuf)
+ echo "-M fpm:protobuf" > $SNAP_DATA/fpm.conf
+ echo "FPM enabled and set to protobuf mode. Please restart FRR"
+ ;;
+ netlink)
+ echo "-M fpm:netlink" > $SNAP_DATA/fpm.conf
+ echo "FPM enabled and set to netlink mode. Please restart FRR"
+ ;;
+ *)
+ echo "Usage:"
+ echo " ${SNAP_NAME}.set fpm {disable|protobuf|netlink}"
+ echo ""
+ echo " Disables FPM module or enables it with specified mode"
+ echo " Mode will be saved for next restart of zebra, but zebra"
+ echo " is not automatically restarted"
+ exit 1
+ ;;
+ esac
+ ;;
+ *)
+ echo "Usage:"
+ echo " ${SNAP_NAME}.set fpm {disable|protobuf|netlink}"
+ echo ""
+ echo " Disables FPM or enables FPM with selected mode"
+ exit 1
+ ;;
+esac
+
+exit 0
if ! [ -e $SNAP_DATA/vtysh.conf ]; then
cp $SNAP/etc/frr/vtysh.conf.default $SNAP_DATA/vtysh.conf
fi
+EXTRA_OPTIONS=""
+if [ -e $SNAP_DATA/fpm.conf ]; then
+ EXTRA_OPTIONS="`cat $SNAP_DATA/fpm.conf`"
+fi
exec $SNAP/sbin/zebra \
-f $SNAP_DATA/zebra.conf \
--pid_file $SNAP_DATA/zebra.pid \
--socket $SNAP_DATA/zsock \
- --vty_socket $SNAP_DATA
-
+ --vty_socket $SNAP_DATA \
+ --moduledir $SNAP/lib/frr/modules $EXTRA_OPTIONS
- network
- network-bind
- network-control
+ set:
+ command: bin/set-options
zebra-debug:
command: sbin/zebra -f $SNAP_DATA/zebra.conf --pid_file $SNAP_DATA/zebra.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
plugs:
- bison
- flex
- python3-dev
+ - protobuf-c-compiler
stage-packages:
- coreutils
- iproute2
- --enable-group=root
- --enable-pimd
- --enable-ldpd
+ - --enable-fpm
+ - --enable-protobuf
- --enable-configfile-mask=0640
- --enable-logfile-mask=0640
- --localstatedir=/var/run