]> git.puffer.fish Git - mirror/frr.git/commitdiff
debianpkg, redhat, tools: Fixup startup/build for new daemon
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 26 Apr 2018 00:48:17 +0000 (20:48 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 29 Jul 2018 16:37:25 +0000 (12:37 -0400)
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>
debianpkg/frr.logrotate
redhat/daemons
redhat/frr.init
redhat/frr.spec.in
tools/etc/frr/daemons.conf
tools/frr

index 2b4acd89c7a66bcc5b17c86a6bbdfbf9f2ebd2c3..750b9aef138695d974e7100fe27b11acc3f718fe 100644 (file)
@@ -17,7 +17,7 @@
             # open, as well as the daemons, so always signal the daemons.
             # It's safe, a NOP if (only) syslog is being used.
             for i in babeld bgpd eigrpd isisd ldpd nhrpd ospf6d ospfd \
-                pimd ripd ripngd zebra ; do
+                pimd ripd ripngd zebra staticd ; do
                 if [ -e /var/run/frr/$i.pid ] ; then
                     pids="$pids $(cat /var/run/frr/$i.pid)"
                 fi
index b674d738b8f24864faaca361872fee9a80837146..f9dbffea4d8e43420813fba7c7900ce9fdca7f51 100644 (file)
@@ -51,6 +51,7 @@ eigrpd=no
 babeld=no
 sharpd=no
 pbrd=no
+staticd=no
 #
 # Command line options for the daemons
 #
@@ -68,6 +69,7 @@ eigrpd_options=("-A 127.0.0.1")
 babeld_options=("-A 127.0.0.1")
 sharpd_options=("-A 127.0.0.1")
 pbrd_options=("-A 127.0.0.1")
+staticd_options=("-A 127.0.0.1")
 
 #
 # If the vtysh_enable is yes, then the unified config is read
index 19b282fe1a52c7d67bbee6aa4bd73cc371135868..740aa5b64dfb70d4de4dbdc4c84ab9b4c5d6ae09 100755 (executable)
@@ -33,7 +33,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 pimd pbrd ldpd nhrpd eigrpd babeld"
+DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd pbrd ldpd nhrpd eigrpd babeld staticd sharpd"
 MAX_INSTANCES=5
 RELOAD_SCRIPT=/usr/lib/frr/frr-reload.py
 
index 85fb309048e9bfc4fe220cd9d425d02cebc51fb1..f5b116978e4e27660d81ba3a414996732169523a 100644 (file)
@@ -85,7 +85,7 @@
 %{!?frr_gid:            %global  frr_gid            92 }
 %{!?vty_gid:            %global  vty_gid            85 }
 
-%define daemon_list zebra ripd ospfd bgpd isisd ripngd ospf6d pbrd
+%define daemon_list zebra ripd ospfd bgpd isisd ripngd ospf6d pbrd staticd
 
 %if %{with_ldpd}
     %define daemon_ldpd ldpd
@@ -416,6 +416,7 @@ zebra_spec_add_service ()
 
 zebra_spec_add_service zebrasrv 2600/tcp "zebra service"
 zebra_spec_add_service zebra    2601/tcp "zebra vty"
+zebra_spec_add_service staticd  2616/tcp "staticd vty"
 zebra_spec_add_service ripd     2602/tcp "RIPd vty"
 zebra_spec_add_service ripngd   2603/tcp "RIPngd vty"
 zebra_spec_add_service ospfd    2604/tcp "OSPFd vty"
@@ -561,6 +562,7 @@ fi
 %{_infodir}/frr.info.gz
 %{_mandir}/man*/*
 %{_sbindir}/zebra
+%{_sbindir}/staticd
 %{_sbindir}/ospfd
 %{_sbindir}/ripd
 %{_sbindir}/bgpd
index e6c0cde9686b051cf88740f096a614ecb4d3ed3e..04a857f47d26dc2ba8f0d08a447b33c55bd23e2d 100644 (file)
@@ -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
index 7d7b97433ac00c6e2975fead6e7b7efc747ef6d3..99acb6b1f765c845ed115c8f0b988af9c0432594 100755 (executable)
--- 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
 }