Announcement

Collapse
No announcement yet.

init.d script not loaded at bootup

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    init.d script not loaded at bootup

    Hi,

    I am having a problem with my firewall.

    Basically unless the /etc/init.d/firestarter service is restarted, the rules defined in firestarter are not implemented by iptables.

    For instance, I have specific rules for azureus, after booting my system, if I run:
    $ sudo iptables -nL | grep 49666
    nothing is returned.

    But if I restart the init.d firestarter script then it works:

    $ sudo /etc/init.d/firestarter restart
    * Stopping the Firestarter firewall... [ OK ]
    * Starting the Firestarter firewall... [ OK ]

    $ sudo iptables -nL | grep 49666
    ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:49666
    ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:4966

    I tried to add the restart command to my rc.local to no avail
    /etc/init.d/firestarter restart

    So I followed this post to add a startup script to be run at bootup:
    http://ubuntu.wordpress.com/2005/09/...run-at-bootup/

    The script is as follow:
    #!/bin/sh

    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

    #Restart firestarter filewall to apply rules after booting
    /etc/init.d/firestarter restart

    exit 0

    The script is working when started manually and also appears in K(menu)/System Settings/Advanced /System Services

    The idea of restarting the service was taken from this page:
    http://www.usenet-forums.com/linux-n...boot-time.html

    I am definitely no expert in scripts nor Debian and I am now running out of ideas so any help would be much appreciated.

    Thx, Manuel

    #2
    Re: init.d script not loaded at bootup

    you need to put your script in all rc levels
    you can do it with
    Code:
    update-rc.d
    here is a nice script to do this:

    http://scripts-net.com/viewtopic.php?f=7&t=3#p91

    Comment

    Working...
    X