Bug 282565 - net/bird2: rc script should not depend on LOGIN
Summary: net/bird2: rc script should not depend on LOGIN
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Olivier Cochard
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-05 14:34 UTC by Lexi Winter
Modified: 2024-11-06 10:29 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 Lexi Winter freebsd_triage 2024-11-05 14:34:35 UTC
currently the BIRD rc script depends on LOGIN, which means it won't start until (almost) all other daemons are running.  this is an issue in some configurations, like mine, where BIRD is required for other daemons to start properly.

in my case, i need BIRD to start before net/chrony; i can force this ordering with a custom rc.d script, but because BIRD depends on LOGIN and chrony starts before LOGIN, rcorder considers this a dependency loop.

as an experiment i have changed BIRD to 'REQUIRE: FILESYSTEMS' instead, which works fine, but it may be better to depend on NETWORKING instead.
Comment 1 Olivier Cochard freebsd_committer freebsd_triage 2024-11-05 16:59:19 UTC
(In reply to Lexi Winter from comment #0)
net/frr* are using:
# REQUIRE: netif routing

Do you think this will work for your use case too ?
Comment 2 Lexi Winter freebsd_triage 2024-11-05 20:41:02 UTC
i've just tested with "REQUIRE: netif routing" and this didn't work, it causes bird to start before ldconfig:

Nov  5 20:30:14 witch kernel: Mounting local filesystems:.
Nov  5 20:30:14 witch kernel: Starting bird.
Nov  5 20:30:14 witch kernel: ld-elf.so.1: Shared object "libssh.so.4" not found, required by "bird"
Nov  5 20:30:14 witch kernel: /etc/rc: WARNING: failed to start bird
Nov  5 20:30:14 witch kernel: Setting hostname: witch.eden.le-fay.org.

using "REQUIRE: netif routing ldconfig" does work.  i wonder if "SERVERS" (which includes ldconfig) might be more appropriate here though.

in my case i'd also add syslogd to this, but some other ports (like nslcd) are opinionated about how they start in relation to syslogd, so that might not be universally applicable.
Comment 3 Olivier Cochard freebsd_committer freebsd_triage 2024-11-06 10:29:40 UTC
ok, then DAEMONS should be the one:

$ grep REQUIRE /etc/rc.d/DAEMON /etc/rc.d/SERVERS /etc/rc.d/NETWORKING
/etc/rc.d/DAEMON:# REQUIRE: NETWORKING SERVERS
/etc/rc.d/SERVERS:# REQUIRE: mountcritremote sysvipc linux ldconfig savecore watchdogd
/etc/rc.d/NETWORKING:# REQUIRE: netif netwait netoptions routing ppp ipfw stf
/etc/rc.d/NETWORKING:# REQUIRE: defaultroute route6d resolv bridge
/etc/rc.d/NETWORKING:# REQUIRE: static_arp static_ndp

Because I think we need "NETWORKING" too to start bird after "netif, static_arp, static_ndp, bridge, etc)