forked from FRRouting/frr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snapcraft: Add FPM module with command to set mode or disable it
- New snap command: frr.set fpm {disable | protobuf | netlink} Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
- Loading branch information
1 parent
80b4df3
commit d851b2f
Showing
5 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters