Find the answer to your Linux question:
Results 1 to 7 of 7
I have to run the firewall configuration script at boot time ! thank you !...
  1. #1
    Just Joined!
    Join Date
    Nov 2004
    Posts
    6

    how to run a script at boot time ? (Debian)



    I have to run the firewall configuration script at boot time ! thank you !

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,039
    place it in /etc/rc5.d/
    -lakerdonald

  3. #3
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Runlevel 5 is not the default runlevel in Debian.

    If you check /etc/inittab, I believe runlevel 2 is the default.

    Look at the scripts in /etc/init.d/. These will give you an idea of what you need to do. The basic thing you need to understand is the case command within the shell.

    Once you've created a script along those guidelines, now you can add two softlinks. One should start with 'S' and another should start with 'K'. Each will be followed by a two digit number where the number describes the order in which this script will be loaded.

    The link with 'S' will start the script as where the script with 'K' will kill it.

    I'll post how I run my iptables on my router if it will help. The only thing is I can't do it today as I won't be home till tomorrow.
    The best things in life are free.

  4. #4
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,039
    doh
    sorry :/
    it's 5 for me, but oh well...

  5. #5
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    You are probably using a RH based distro?

    This caught me off guard when I started using Debian. I wish it were like RH though. It makes more sense.

    I suppose I can take the time rearrange this but I'm lazy.
    The best things in life are free.

  6. #6
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,039
    I use Aurox, which is lite version of Fedora made in Poland

  7. #7
    Just Joined!
    Join Date
    Nov 2004
    Posts
    6
    i've done it. i put my script in /etc/init.d and update-rc.d myscript default 80
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •