Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
19.7 Legacy Series
»
Arguments passed to scripts in /usr/local/etc/rc.syshook.d/carp
« previous
next »
Print
Pages: [
1
]
Author
Topic: Arguments passed to scripts in /usr/local/etc/rc.syshook.d/carp (Read 2507 times)
whit
Newbie
Posts: 35
Karma: 1
Arguments passed to scripts in /usr/local/etc/rc.syshook.d/carp
«
on:
October 10, 2019, 09:13:47 pm »
Looking at 20-openvpn there it looks like two variables are expected, where the 2nd one is either MASTER or BACKUP, presumably passed to each script in this directory just when carp switches status. The first variable gets read as "subsystem," presumably something about the identity of what triggered the carp status change. I also see
https://docs.opnsense.org/development/backend/autorun.html
as reference.
Several questions then:
What are the possible (sane) subsystems for this context? Are there known problem cases to beware of here in the context of taking action, or is it generally safe to ignore this value beyond perhaps logging it?
Are scripts in carp run on initial system startup, just if the system starts up as MASTER?
Thanks!
Logged
whit
Newbie
Posts: 35
Karma: 1
Re: Arguments passed to scripts in /usr/local/etc/rc.syshook.d/carp
«
Reply #1 on:
October 15, 2019, 10:44:16 pm »
Are there docs pertinent to this deeper functionality somewhere? Is it specific to OPNsense, or inherited from somewhere upstream?
Logged
whit
Newbie
Posts: 35
Karma: 1
Re: Arguments passed to scripts in /usr/local/etc/rc.syshook.d/carp
«
Reply #2 on:
October 15, 2019, 10:54:31 pm »
Then here I'm seeing a suggestion that the existing "openvpn" file there is misnamed:
https://www.bountysource.com/issues/65768122-carp-events-notifications-can-be-in-separate-file
What direction is this going now?
Logged
franco
Administrator
Hero Member
Posts: 17660
Karma: 1611
Re: Arguments passed to scripts in /usr/local/etc/rc.syshook.d/carp
«
Reply #3 on:
October 29, 2019, 01:48:39 pm »
Devd is responsible for triggering the events and arguments:
https://github.com/opnsense/core/blob/master/src/etc/devd/carp.conf
If you want to know more look at FreeBSD directly:
# man carp
# man devd
Cheers,
Franco
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
19.7 Legacy Series
»
Arguments passed to scripts in /usr/local/etc/rc.syshook.d/carp