diff options
author | Martin Winter <mwinter@opensourcerouting.org> | 2019-11-09 16:27:04 +0100 |
---|---|---|
committer | Martin Winter <mwinter@opensourcerouting.org> | 2019-11-19 10:46:33 +0100 |
commit | 7b9e46d493251f2a58d8ed2f3890ca3397502b92 (patch) | |
tree | c375bcffaf7333dd77189d8b74e26c65c27b6091 /snapcraft | |
parent | Merge pull request #5298 from donaldsharp/bgp_prefix_rpki (diff) | |
download | frr-7b9e46d493251f2a58d8ed2f3890ca3397502b92.tar.xz frr-7b9e46d493251f2a58d8ed2f3890ca3397502b92.zip |
snapcraft: Add vrrpd to the snapcraft package
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Diffstat (limited to 'snapcraft')
-rw-r--r-- | snapcraft/defaults/vrrpd.conf.default | 0 | ||||
-rw-r--r-- | snapcraft/scripts/Makefile | 1 | ||||
-rw-r--r-- | snapcraft/scripts/vrrpd-service | 13 | ||||
-rw-r--r-- | snapcraft/snapcraft.yaml.in | 16 |
4 files changed, 29 insertions, 1 deletions
diff --git a/snapcraft/defaults/vrrpd.conf.default b/snapcraft/defaults/vrrpd.conf.default new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/snapcraft/defaults/vrrpd.conf.default diff --git a/snapcraft/scripts/Makefile b/snapcraft/scripts/Makefile index 7ddb7f076..0435b3bc5 100644 --- a/snapcraft/scripts/Makefile +++ b/snapcraft/scripts/Makefile @@ -18,6 +18,7 @@ install: install -D -m 0755 staticd-service $(DESTDIR)/bin/ install -D -m 0755 bfdd-service $(DESTDIR)/bin/ install -D -m 0755 fabricd-service $(DESTDIR)/bin/ + install -D -m 0755 vrrpd-service $(DESTDIR)/bin/ install -D -m 0755 set-options $(DESTDIR)/bin/ install -D -m 0755 show_version $(DESTDIR)/bin/ diff --git a/snapcraft/scripts/vrrpd-service b/snapcraft/scripts/vrrpd-service new file mode 100644 index 000000000..1f60d1146 --- /dev/null +++ b/snapcraft/scripts/vrrpd-service @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e -x + +if ! [ -e $SNAP_DATA/vrrpd.conf ]; then + cp $SNAP/etc/frr/vrrpd.conf.default $SNAP_DATA/vrrpd.conf +fi +exec $SNAP/sbin/vrrpd \ + -f $SNAP_DATA/vrrpd.conf \ + --pid_file $SNAP_DATA/vrrpd.pid \ + --socket $SNAP_DATA/zsock \ + --vty_socket $SNAP_DATA + diff --git a/snapcraft/snapcraft.yaml.in b/snapcraft/snapcraft.yaml.in index d8071e8cf..b06e841f7 100644 --- a/snapcraft/snapcraft.yaml.in +++ b/snapcraft/snapcraft.yaml.in @@ -134,6 +134,13 @@ apps: - network - network-bind - network-control + vrrpd: + command: bin/vrrpd-service + daemon: simple + plugs: + - network + - network-bind + - network-control set: command: bin/set-options zebra-debug: @@ -232,7 +239,12 @@ apps: - network - network-bind - network-control - + vrrpd-debug: + command: sbin/vrrpd -f $SNAP_DATA/vrrpd.conf --pid_file $SNAP_DATA/vrrpd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA + plugs: + - network + - network-bind + - network-control parts: rtrlib: build-packages: @@ -327,6 +339,7 @@ parts: - --enable-fpm - --enable-protobuf - --enable-rpki + - --enable-vrrpd - --enable-configfile-mask=0640 - --enable-logfile-mask=0640 - --localstatedir=/var/run @@ -353,6 +366,7 @@ parts: pbrd.conf.default: etc/frr/pbrd.conf.default bfdd.conf.default: etc/frr/bfdd.conf.default fabricd.conf.default: etc/frr/fabricd.conf.default + vrrpd.conf.default: etc/frr/vrrpd.conf.default vtysh.conf.default: etc/frr/vtysh.conf.default staticd.conf.default: etc/frr/staticd.conf.default frr-scripts: |