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:

    <shellcmd>command1 arg1</shellcmd>

    Before <shellcmd>command is executed than one sh script in /usr/local/etc/rc.d/ or later???


  • 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/

    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/ with

    #!/bin /sh
    echo "I am /usr/local/etc/rc.d/" >> /order.tmp;

    And the dump of /order.tmp

    cat /order.tmp

    I am /usr/local/etc/rc.d/
    I'm earlyshell
    I am shellcmd
    I am /usr/local/etc/rc.d/


Log in to reply