Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    PfSense boot order of execution

    Scheduled Pinned Locked Moved General pfSense Questions
    2 Posts 1 Posters 1.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      javcasta
      last edited by

      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>

      Javier Castañón
      Técnico de comunicaciones, soporte y sistemas.

      Mi web: https://javcasta.com/

      Soporte scripting/pfSense https://javcasta.com/soporte/

      1 Reply Last reply Reply Quote 0
      • J
        javcasta
        last edited by

        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.sh

        Regards

        Javier Castañón
        Técnico de comunicaciones, soporte y sistemas.

        Mi web: https://javcasta.com/

        Soporte scripting/pfSense https://javcasta.com/soporte/

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.