How to set up a specific order for services on startup

Hello,
I have a question, I have a machine that is doing a lot of things on my home network and is amazing how much you can get out of old hardware with FreeBSD

Now, my problem is that I have both an IPSEC tunnel and a OpenVPN running on the same machine without issues, but on reboot when PF starts it doesn't find any of the virtual interfaces for any of them and naturally if fails to start. I have fixed this using rc.local to load the pf rules, but I'm wondering if there is a way to determine the startup order of the services.


Thank you
 
rcorder(8)

To see the current order of services:
# rcorder /etc/rc.d/* /usr/local/etc/rc.d/*

To change the order, you edit the file(s) in the rc.d directory to change the BEFORE, and REQUIRE lines.

For example, if you edit the /etc/rc.d/pf file and put "openvpn" at the end of the REQUIRE line, you'll probably get the result you want.

Be sure to check the rcorder output before and after changes. And make copies of the files *BEFORE* you edit them. In case you need to revert the changes. :)
 
Back
Top