PfSense boot order of execution
-
Hi.
One question about the order is executed the sh scripts at /usr/local/etc/rc.d/ and commands defined at config.xml:
<system>... <shellcmd>command1 arg1</shellcmd> ...</system>
Before <shellcmd>command is executed than one sh script in /usr/local/etc/rc.d/ or later???
Regards</shellcmd>
-
Hi.
I have already checked the execution order of the 3 pfSense options to launch a command or script at startup.
Is the next:1- /usr/local/etc/rc.d/.sh
2- <earlyshell>3- <shellcmd>4- /usr/local/etc/rc.d/.sh</shellcmd></earlyshell>It seems that sh scripts in /usr/local/etc/rc.d/ run twice, first order and again, after shellcmd and earlyshellcmd
I defined in config.xml
<earlyshellcmd>echo "I am earlyshell" >> /order.tmp</earlyshellcmd> <shellcmd>echo "I am shellcmd" >> /order.tmp</shellcmd>
I created a script with execute permissions in /usr/local/etc/rc.d/order.sh with
#!/bin /sh echo "I am /usr/local/etc/rc.d/order.sh" >> /order.tmp;
And the dump of /order.tmp
cat /order.tmp
I am /usr/local/etc/rc.d/order.sh
I'm earlyshell
I am shellcmd
I am /usr/local/etc/rc.d/order.shRegards