Bug 245480 - net/frr7: fix frr startup script to handle "all" properly
Summary: net/frr7: fix frr startup script to handle "all" properly
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Olivier Cochard
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-09 15:15 UTC by Joe Greco
Modified: 2020-04-12 16:05 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (olivier)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Greco 2020-04-09 15:15:43 UTC
frr includes watchfrr, a component to watch the frr daemons and restart them if crashed.

watchfrr will try to restart a single daemon by issuing "service frr onerestart ospfd", for example, which works fine.  However, if multiple daemons have crashed, it will issue "service frr onerestart all" and this fails.

The frr startup script at /usr/local/etc/rc.d/frr does not handle "all" properly (or actually at all).

This is easily remedied.  A stanza exists around line 136 to select the frr_daemons to restart if arguments have been provided.

if [ $# -ge 1 ]; then
        frr_daemons="$*"
fi

can be changed to

if [ $# -ge 1 -a "$1" != "all" ]; then
        frr_daemons="$*"
fi
Comment 1 commit-hook freebsd_committer 2020-04-12 16:01:24 UTC
A commit references this bug:

Author: olivier
Date: Sun Apr 12 16:01:00 UTC 2020
New revision: 531526
URL: https://svnweb.freebsd.org/changeset/ports/531526

Log:
  Add 'service frr onerestart all' usage.

  PR:		245480
  Submitted by:	Joe Greco <jgreco@ns.sol.net>

Changes:
  head/net/frr7/Makefile
  head/net/frr7/files/frr.in
Comment 2 Olivier Cochard freebsd_committer 2020-04-12 16:05:59 UTC
Thanks for your patch.