# pkg rc.d scripts



## biggsy (Dec 24, 2021)

I'm very new to this aspect of FreeBSD but trying to understand it better.

After a recent update from 12.2 to 12.3-R, (on the path to 13-RELEASE) I was trying to understand why `openbgpd` was suddenly being shut down before `fail2ban`, causing the latter to complain that it couldn't find `openbgp.sock`.

After a lot of reading, I changed the `/usr/local/etc/rc.d/openbgpd` script to include `# BEFORE:  fail2ban` and that seems to have had the desired effect.

However, after looking at the output from `rcorder  /etc/rc.d/* /usr/local/etc/rc.d/*` I noticed the output:
`rcorder: requirement `openbgpd' in file `/usr/local/etc/rc.d/fail2ban' has no providers.`  Something else to learn about.

From there I started to look at `/usr/local/etc/rc.d/openbgpd` again and noticed it said `# PROVIDE:  bgpd dynamicrouting`

The question is:  Should the statement have read `# PROVIDE:  openbgpd dynamicrouting`?
In other words, should the name of the script match the name in the # PROVIDE statement, or am I completely misunderstanding this?

Many thanks.


----------



## biggsy (Dec 27, 2021)

Having worked out that I was misunderstanding the the structure of these scripts and fixed my error, I upgraded to 13.0-RELEASE.

After updating packages, I found that the openbgpd script in /usr/local/etc/rc.d had lost my change.  That's OK but now, after redoing that change, I'm getting a mismatched checksum in the daily security report.

Is that to be expected?  Even for a file that is likely to be changed?


----------



## grahamperrin@ (Dec 28, 2021)

biggsy said:


> … mismatched checksum in the daily security report.
> 
> Is that to be expected? …



If the file changed, yes.


```
% pkg provides /usr/local/etc/rc.d/openbgpd
Name    : openbgpd6-6.9p0
Desc    : Free implementation of the Border Gateway Protocol, Version 4
Repo    : FreeBSD
Filename: usr/local/etc/rc.d/openbgpd

Name    : openbgpd-5.2.20121209_4,1
Desc    : Free implementation of the Border Gateway Protocol, Version 4
Repo    : FreeBSD
Filename: usr/local/etc/rc.d/openbgpd
%
```


----------



## biggsy (Dec 28, 2021)

Many thanks.


----------

