Bug 227415

Summary: net/frr: wrong path for watchfrr.pid
Product: Ports & Packages Reporter: Alexey <pautina>
Component: Individual Port(s)Assignee: Olivier Cochard <olivier>
Status: Closed FIXED    
Severity: Affects Many People Flags: bugzilla: maintainer-feedback? (olivier)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Alexey 2018-04-10 09:54:17 UTC
wachfrr starts normally, but when I executed the command status or stop, it says:

[root@nas0 /]# /usr/local/etc/rc.d/watchfrr status
watchfrr is not running.
[root@nas0 /]#

In this case, the PID file exists:

[root@nas0 /]# ls -la /var/run/frr/watchfrr.pid
-rw-r--r--  1 root  frr  6 10 апр.  10:23 /var/run/frr/watchfrr.pid
[root@nas0 /]#

The problem in the line of this file is /usr/local/etc/rc.d/watchfrr :

pidfile=%%LOCALSTATE_DIR%%/watchfrr.pid

If it is replaced by: pidfile =/var/run/frr/watchfrr.pid - then all commands are executed successfully.

Also, please add an example of the options for file rc.conf :

watchfrr_enable="YES"
watchfrr_flags=" -d -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB -t 30 zebra ospfd"
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-04-15 11:24:19 UTC
A commit references this bug:

Author: olivier
Date: Sun Apr 15 11:23:42 UTC 2018
New revision: 467384
URL: https://svnweb.freebsd.org/changeset/ports/467384

Log:
  Fix watchfrr RC script and build on 10.3

  PR:		227415
  Reported by:	pautina@kharkiv.net

Changes:
  head/net/frr/Makefile
  head/net/frr/files/patch-lib_vty.h
  head/net/frr/files/watchfrr.in
Comment 2 Olivier Cochard freebsd_committer freebsd_triage 2018-04-15 11:31:08 UTC
Thanks a lot's for your PR!
I've choose to set the default watchfrr_flags using your example too, but with the he same list of FRR daemons as the default RC script.
Comment 3 Alexey 2018-04-23 07:22:06 UTC
(In reply to Olivier Cochard from comment #2)
Thank you. Good improvement
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-04-29 11:42:01 UTC
A commit references this bug:

Author: olivier
Date: Sun Apr 29 11:41:08 UTC 2018
New revision: 468620
URL: https://svnweb.freebsd.org/changeset/ports/468620

Log:
  MFH: r467384 r467574

  Fix watchfrr RC script and build on 10.3

  PR:		227415
  Reported by:	pautina@kharkiv.net

  Fix plist with FPM option

  Reported by:	prj@rootwyrm.com

  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q2/
  branches/2018Q2/net/frr/Makefile
  branches/2018Q2/net/frr/files/patch-lib_vty.h
  branches/2018Q2/net/frr/files/watchfrr.in
  branches/2018Q2/net/frr/pkg-plist