summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-04-26 02:48:17 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-07-29 18:37:25 +0200
commit7ac1de8ee01573ed97c890879adbe7cc1013718b (patch)
tree5ab27ac55c25b88aed9a9a3f79a4823e3d6a4e72 /tools
parentstaticd: Start the addition of a staticd (diff)
downloadfrr-7ac1de8ee01573ed97c890879adbe7cc1013718b.tar.xz
frr-7ac1de8ee01573ed97c890879adbe7cc1013718b.zip
debianpkg, redhat, tools: Fixup startup/build for new daemon
Add code to allow FRR to properly build and handle the staticd for some of the more common packaging. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/etc/frr/daemons.conf1
-rwxr-xr-xtools/frr23
2 files changed, 23 insertions, 1 deletions
diff --git a/tools/etc/frr/daemons.conf b/tools/etc/frr/daemons.conf
index e6c0cde96..04a857f47 100644
--- a/tools/etc/frr/daemons.conf
+++ b/tools/etc/frr/daemons.conf
@@ -18,6 +18,7 @@ eigrpd_options=" --daemon -A 127.0.0.1"
babeld_options=" --daemon -A 127.0.0.1"
sharpd_options=" --daemon -A 127.0.0.1"
pbrd_options=" --daemon -A 127.0.0.1"
+staticd_options=" --daemon -A 127.0.0.1"
# The list of daemons to watch is automatically generated by the init script.
watchfrr_enable=yes
diff --git a/tools/frr b/tools/frr
index 7d7b97433..99acb6b1f 100755
--- a/tools/frr
+++ b/tools/frr
@@ -21,7 +21,7 @@ V_PATH=/var/run/frr
# Local Daemon selection may be done by using /etc/frr/daemons.
# See /usr/share/doc/frr/README.Debian.gz for further information.
# Keep zebra first and do not list watchfrr!
-DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd ldpd nhrpd eigrpd sharpd pbrd"
+DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd ldpd nhrpd eigrpd sharpd pbrd staticd"
MAX_INSTANCES=5
RELOAD_SCRIPT=/usr/lib/frr/frr-reload.py
@@ -170,6 +170,22 @@ start()
`eval echo "$""$1""_options"`
fi
fi
+
+ # Start the staticd automatically
+ if [ "$1" = "zebra" ]; then
+ echo -n "starting staticd since zebra is running"
+ if ! check_daemon staticd ; then
+ echo -n " (binary does not exist)"
+ return;
+ fi
+
+ ${SSD} \
+ --start \
+ --pidfile=`pidfile staticd` \
+ --exec "$D_PATH/staticd" \
+ -- \
+ `eval echo "$"staticd"_options"`
+ fi
}
# Stop the daemon given in the parameter, printing its name to the terminal.
@@ -210,6 +226,11 @@ stop()
echo -n " $inst"
rm -f `pidfile $inst`
rm -f `vtyfile $inst`
+
+ if [ "$1" = "zebra" ]; then
+ echo -n "Stopping staticd since zebra is running"
+ stop staticd
+ fi
fi
}