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

Custom script in /usr/local/etc/rc.d, execution order/trigger question.

Scheduled Pinned Locked Moved General pfSense Questions
5 Posts 2 Posters 1.1k 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.
  • W
    w0w
    last edited by w0w Aug 2, 2018, 10:35 AM Aug 2, 2018, 10:34 AM

    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?

    1 Reply Last reply Reply Quote 0
    • K
      kpa
      last edited by Aug 2, 2018, 1:26 PM

      https://www.freebsd.org/cgi/man.cgi?query=rc&sektion=8

      W 1 Reply Last reply Aug 2, 2018, 5:07 PM Reply Quote 0
      • W
        w0w @kpa
        last edited by Aug 2, 2018, 5:07 PM

        @kpa
        Are you sure that it's applicable to pfSense?

        1 Reply Last reply Reply Quote 0
        • K
          kpa
          last edited by Aug 2, 2018, 5:08 PM

          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.

          W 1 Reply Last reply Aug 2, 2018, 5:19 PM Reply Quote 1
          • W
            w0w @kpa
            last edited by Aug 2, 2018, 5:19 PM

            @kpa
            Thanks.

            1 Reply Last reply Reply Quote 0
            1 out of 5
            • First post
              1/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received