Custom script in /usr/local/etc/rc.d, execution order/trigger question.
-
It looks like script placed in /usr/local/etc/rc.d executes twice, on startup and on shutdown. Am I right?
At least when I reboot using console menu, pfSense gives some message in console about stopping custom scripts and script produces some output, I just tested it with test output file. When I just quit the pfSense menu going to shell and typing reboot, script then runs only once on next boot. Is it expected behavior? -
https://www.freebsd.org/cgi/man.cgi?query=rc&sektion=8
-
@kpa
Are you sure that it's applicable to pfSense? -
The behaviour of /usr/local/etc/rc.d scripts in pfSense matches what is described in that manual page so I have to assume that part is unchanged in pfSense.
-
@kpa
Thanks.
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.