Skip to content

Commit

Permalink
snapcraft: Add nhrpd to snap
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
  • Loading branch information
mwinter-osr committed Apr 21, 2017
1 parent 5ae4018 commit ae49894
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
Empty file.
2 changes: 1 addition & 1 deletion snapcraft/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ install:
install -D -m 0755 isisd-service $(DESTDIR)/bin/
install -D -m 0755 pimd-service $(DESTDIR)/bin/
install -D -m 0755 ldpd-service $(DESTDIR)/bin/

install -D -m 0755 nhrpd-service $(DESTDIR)/bin/
12 changes: 12 additions & 0 deletions snapcraft/scripts/nhrpd-service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

set -e -x

if ! [ -e $SNAP_DATA/nhrpd.conf ]; then
cp $SNAP/etc/frr/nhrpd.conf.default $SNAP_DATA/nhrpd.conf
fi
exec $SNAP/sbin/nhrpd \
-f $SNAP_DATA/nhrpd.conf \
--pid_file $SNAP_DATA/nhrpd.pid \
--socket $SNAP_DATA/zsock \
--vty_socket $SNAP_DATA
18 changes: 16 additions & 2 deletions snapcraft/snapcraft.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ apps:
- network
- network-bind
- network-control
nhrpd:
command: bin/nhrpd-service
daemon: simple
plugs:
- network
- network-bind
- network-control
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:
Expand Down Expand Up @@ -132,12 +139,18 @@ apps:
- network-bind
- network-control
ldpd-debug:
command: sbin/ldpd -f $SNAP_DATA/pimd.conf --pid_file $SNAP_DATA/pimd.pid --socket $SNAP_DATA/zsock --ctl_socket $SNAP_DATA --vty_socket $SNAP_DATA
command: sbin/ldpd -f $SNAP_DATA/ldpd.conf --pid_file $SNAP_DATA/ldpd.pid --socket $SNAP_DATA/zsock --ctl_socket $SNAP_DATA --vty_socket $SNAP_DATA
plugs:
- network
- network-bind
- network-control

nhrpd-debug:
command: sbin/nhrpd -f $SNAP_DATA/nhrpd.conf --pid_file $SNAP_DATA/nhrpd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
plugs:
- network
- network-bind
- network-control

parts:
frr:
build-packages:
Expand Down Expand Up @@ -215,6 +228,7 @@ parts:
ripd.conf.default: etc/frr/ripd.conf.default
ripngd.conf.default: etc/frr/ripngd.conf.default
ldpd.conf.default: etc/frr/ldpd.conf.default
nhrpd.conf.default: etc/frr/nhrpd.conf.default
vtysh.conf.default: etc/frr/vtysh.conf.default
frr-scripts:
plugin: make
Expand Down

0 comments on commit ae49894

Please sign in to comment.