Navigation

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

    Executing a Script before shutdown/rebooting

    General pfSense Questions
    2
    2
    173
    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.
    • F
      fraubergmaier last edited by

      Hello,

      is there a way to execute a script before shutdown/reboot or before the network driver are initialized?

      I am facing the following problem:
      PFsense/FreeBSD does not support the IntelX553 driver https://downloadcenter.intel.com/download/14688/Intel-Network-Adapters-Driver-for-PCIe-10-Gigabit-Network-Connections-Under-FreeBSD
      So I compiled the driver manually and copied it to /boot/kernel/if_ix.ko. After this pfsense recognizes the networkinterface.
      But after an upgrade the networkdrivers are overwritten and after a reboot, pfsense does not recognize the networkinterface.
      If pfsense does not recognize a networkinterface it automatically shutsdown.

      I have written a shell script, that replaces the networkdriver, if the md5sum is not matching. The script works fine, but it does get executed too late.

      What I have tried:

      • Inserted the Script /usr/local/etc/rc.d/*.sh  but pfsense shutsdown, before the script gets executed

      • Tried it with the earlyshellcmd  but pfsense shutsdown, before the script gets executed.

      • Tried it with a conjob @reboot /root/inteldriver.sh  but pfsense shutsdown, before it gets executed.

      • Changed flags to the networkdriver: chflags schg /boot/kernel/if_ix.ko but the driver gets overwritten somehow.

      • Modified the script to be useable with rc.d, but pfsense modified the startup mechanism and the script will not be executed.

      Is there a solution besides, buying a new server or not to update pfsense?

      1 Reply Last reply Reply Quote 0
      • Grimson
        Grimson Banned last edited by

        Boot into single user mode and update the driver by hand, petition the FreeBSD developers to include the driver. Add another NIC to the device, so pfSense does find at least one network interface.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Products

        • Platform Overview
        • TNSR
        • pfSense
        • Appliances

        Services

        • Training
        • Professional Services

        Support

        • Subscription Plans
        • Contact Support
        • Product Lifecycle
        • Documentation

        News

        • Media Coverage
        • Press
        • Events

        Resources

        • Blog
        • FAQ
        • Find a Partner
        • Resource Library
        • Security Information

        Company

        • About Us
        • Careers
        • Partners
        • Contact Us
        • Legal
        Our Mission

        We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

        Subscribe to our Newsletter

        Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

        © 2021 Rubicon Communications, LLC | Privacy Policy