Bug 245480

Summary: net/frr7: fix frr startup script to handle "all" properly
Product: Ports & Packages Reporter: Joe Greco <jgreco>
Component: Individual Port(s)Assignee: Olivier Cochard <olivier>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (olivier)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

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 freebsd_triage 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 freebsd_triage 2020-04-12 16:05:59 UTC
Thanks for your patch.