How to prevent startup scripts from executing twice



  • 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



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



  • @billm:

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

    That is correct.



  • 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


Log in to reply