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

How to prevent startup scripts from executing twice

Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
4 Posts 3 Posters 2.8k 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.
  • P
    pcatiprodotnet
    last edited by Nov 1, 2006, 3:28 AM Oct 30, 2006, 3:58 AM

    In v1.0 imbedded it appears to be executing startup scripts twice in /usr/local/etc/rc.d
    Is there a way to prevent this if my router does not have access to the internet for updates.
    Thanks, -pc

    1 Reply Last reply Reply Quote 0
    • B
      billm
      last edited by Oct 30, 2006, 4:23 AM

      @pcatiprodotnet:

      In v1.0 imbedded it appears to be executing startup scripts twice in /usr/local/etc/rc.d
      Is there a way to prevent this if my router does not have access to the internet for updates.
      Thanks, -pc

      I think that was a display bug, not actually starting stuff twice.

      –Bill

      pfSense core developer
      blog - http://www.ucsecurity.com/
      twitter - billmarquette

      1 Reply Last reply Reply Quote 0
      • S
        sullrich
        last edited by Oct 30, 2006, 5:00 AM

        @billm:

        I think that was a display bug, not actually starting stuff twice.

        That is correct.

        1 Reply Last reply Reply Quote 0
        • P
          pcatiprodotnet
          last edited by Nov 1, 2006, 3:29 AM Nov 1, 2006, 2:45 AM

          I'm not certain; it appears to execute twice in my system logs (relevant lines below)…

          ...
          Welcome to pfSense 1.0.1 on the 'embedded' platform...
          ...
          Executing rc.d items...
          Stopping /usr/local/etc/rc.d/dnsmasq.sh...done.
          Stopping /usr/local/etc/rc.d/olsrd.sh...done.
          Starting /usr/local/etc/rc.d/dnsmasq.sh...done.
          Starting /usr/local/etc/rc.d/olsrd.sh...done.
          Bootup complete
          ...
          Dec 31 19:23:33 dnsmasq[545]: started, version 2.22 cachesize 150
          Dec 31 19:23:33 dnsmasq[545]: read /etc/hosts - 4 addresses
          Dec 31 19:23:33 dnsmasq[545]: reading /etc/resolv.conf
          Dec 31 19:23:33 dnsmasq[545]: using nameserver 10.0.0.1#53
          Dec 31 19:23:35 pftpx[613]: listening on 127.0.0.1 port 8021
          Dec 31 19:23:35 pftpx[613]: listening on 127.0.0.1 port 8021
          Jan 1 00:23:37 php: : Create RRD database /var/db/rrd/opt1-traffic.rrd
          Jan 1 00:23:37 php: : Create RRD database /var/db/rrd/opt1-packets.rrd
          Jan 1 00:23:37 php: : Creating rrd update script
          Jan 1 00:23:37 php: : Creating rrd graph index
          Oct 31 21:48:07 php: : Resyncing configuration for all packages.
          Oct 31 21:48:07 dnsmasq[545]: exiting on receipt of SIGTERM
          Oct 31 21:48:07 dnsmasq[741]: started, version 2.22 cachesize 150
          Oct 31 21:48:07 dnsmasq[741]: DHCP, IP range 10.138.1.10 – 10.138.1.254, lease time 5m
          Oct 31 21:48:07 dnsmasq[741]: DHCP, IP range 10.130.1.10 – 10.130.1.254, lease time 5m
          Oct 31 21:48:07 dnsmasq[741]: DHCP, IP range 10.0.0.130 – 10.0.0.250, lease time 2h
          Oct 31 21:48:07 dnsmasq[741]: read /etc/hosts - 4 addresses
          Oct 31 21:48:07 dnsmasq[741]: reading /etc/resolv.conf
          Oct 31 21:48:07 dnsmasq[741]: using nameserver 10.0.0.1#53
          Oct 31 21:48:09 olsrd[750]: Adding interface ath0
          Oct 31 21:48:09 olsrd[750]: New main address: 10.130.1.1
          Oct 31 21:48:09 olsrd[750]: Adding interface sis0
          Oct 31 21:48:09 olsrd[750]: Adding interface ath1
          Oct 31 21:48:09 olsrd[757]: olsr.org - 0.4.10 successfully started
          Oct 31 21:48:09 dnsmasq[741]: exiting on receipt of SIGTERM
          Oct 31 21:48:09 olsrd[757]: olsr.org - 0.4.10 stopped
          Oct 31 21:48:09 dnsmasq[762]: started, version 2.22 cachesize 150
          Oct 31 21:48:09 dnsmasq[762]: DHCP, IP range 10.138.1.10 – 10.138.1.254, lease time 5m
          Oct 31 21:48:09 dnsmasq[762]: DHCP, IP range 10.130.1.10 – 10.130.1.254, lease time 5m
          Oct 31 21:48:09 dnsmasq[762]: DHCP, IP range 10.0.0.130 – 10.0.0.250, lease time 2h
          Oct 31 21:48:09 dnsmasq[762]: read /etc/hosts - 4 addresses
          Oct 31 21:48:09 dnsmasq[762]: reading /etc/resolv.conf
          Oct 31 21:48:09 dnsmasq[762]: using nameserver 10.0.0.1#53
          Oct 31 21:48:10 olsrd[764]: Adding interface ath0
          Oct 31 21:48:10 olsrd[764]: New main address: 10.130.1.1
          Oct 31 21:48:10 olsrd[764]: Adding interface sis0
          Oct 31 21:48:10 olsrd[764]: Adding interface ath1
          Oct 31 21:48:10 olsrd[767]: olsr.org - 0.4.10 successfully started
          …

          Example contents of shell script files:
          #!/bin/sh
          cp /root/foo.conf /var/etc/
          killall foo
          sleep 1
          foo -z /var/etc/foo.conf &

          Thanks,
          -Pete

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