mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:07:08 +00:00
Merge pull request #2823 from opensourcerouting/snap-staticd
Updates to snap package to support staticd
This commit is contained in:
commit
4354a8052c
@ -234,6 +234,7 @@ EXTRA_DIST = frr-sphinx.mk \
|
|||||||
user/vnc.rst \
|
user/vnc.rst \
|
||||||
user/vtysh.rst \
|
user/vtysh.rst \
|
||||||
user/zebra.rst \
|
user/zebra.rst \
|
||||||
|
user/flowspec.rst \
|
||||||
mpls/ChangeLog.opaque.txt \
|
mpls/ChangeLog.opaque.txt \
|
||||||
mpls/ospfd.conf \
|
mpls/ospfd.conf \
|
||||||
mpls/cli_summary.txt \
|
mpls/cli_summary.txt \
|
||||||
|
0
snapcraft/defaults/staticd.conf.default
Normal file
0
snapcraft/defaults/staticd.conf.default
Normal file
@ -15,6 +15,7 @@ install:
|
|||||||
install -D -m 0755 babeld-service $(DESTDIR)/bin/
|
install -D -m 0755 babeld-service $(DESTDIR)/bin/
|
||||||
install -D -m 0755 eigrpd-service $(DESTDIR)/bin/
|
install -D -m 0755 eigrpd-service $(DESTDIR)/bin/
|
||||||
install -D -m 0755 pbrd-service $(DESTDIR)/bin/
|
install -D -m 0755 pbrd-service $(DESTDIR)/bin/
|
||||||
|
install -D -m 0755 staticd-service $(DESTDIR)/bin/
|
||||||
install -D -m 0755 set-options $(DESTDIR)/bin/
|
install -D -m 0755 set-options $(DESTDIR)/bin/
|
||||||
install -D -m 0755 show_version $(DESTDIR)/bin/
|
install -D -m 0755 show_version $(DESTDIR)/bin/
|
||||||
|
|
||||||
|
20
snapcraft/scripts/staticd-service
Normal file
20
snapcraft/scripts/staticd-service
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e -x
|
||||||
|
|
||||||
|
if ! [ -e $SNAP_DATA/staticd.conf ]; then
|
||||||
|
if [ -e $SNAP_DATA/zebra.conf ]; then
|
||||||
|
# if we have a zebra.conf, but no staticd conf, then we use
|
||||||
|
# this file as the default config for staticd
|
||||||
|
cp $SNAP_DATA/zebra.conf $SNAP_DATA/staticd.conf
|
||||||
|
else
|
||||||
|
# new config, start with template
|
||||||
|
cp $SNAP/etc/frr/staticd.conf $SNAP_DATA/staticd.conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
exec $SNAP/sbin/staticd \
|
||||||
|
-f $SNAP_DATA/staticd.conf \
|
||||||
|
--pid_file $SNAP_DATA/staticd.pid \
|
||||||
|
--socket $SNAP_DATA/zsock \
|
||||||
|
--vty_socket $SNAP_DATA
|
||||||
|
|
@ -113,6 +113,13 @@ apps:
|
|||||||
- network
|
- network
|
||||||
- network-bind
|
- network-bind
|
||||||
- network-control
|
- network-control
|
||||||
|
staticd:
|
||||||
|
command: bin/staticd-service
|
||||||
|
daemon: simple
|
||||||
|
plugs:
|
||||||
|
- network
|
||||||
|
- network-bind
|
||||||
|
- network-control
|
||||||
set:
|
set:
|
||||||
command: bin/set-options
|
command: bin/set-options
|
||||||
zebra-debug:
|
zebra-debug:
|
||||||
@ -193,6 +200,8 @@ apps:
|
|||||||
- network
|
- network
|
||||||
- network-bind
|
- network-bind
|
||||||
- network-control
|
- network-control
|
||||||
|
staticd-debug:
|
||||||
|
command: sbin/staticd -f $SNAP_DATA/staticd.conf --pid_file $SNAP_DATA/staticd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
frr:
|
frr:
|
||||||
|
@ -356,7 +356,7 @@ int main(int argc, char **argv, char **env)
|
|||||||
break;
|
break;
|
||||||
case OPTION_CONFDIR:
|
case OPTION_CONFDIR:
|
||||||
ditch_suid = 1; /* option disables SUID */
|
ditch_suid = 1; /* option disables SUID */
|
||||||
strlcpy(sysconfdir, optarg, sizeof(sysconfdir));
|
snprintf(sysconfdir, sizeof(sysconfdir), "%s/", optarg);
|
||||||
break;
|
break;
|
||||||
case 'N':
|
case 'N':
|
||||||
if (strchr(optarg, '/') || strchr(optarg, '.')) {
|
if (strchr(optarg, '/') || strchr(optarg, '.')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user