Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Debian Linux Help > how to run a script at boot time ? (Debian)
 Debian Linux Help   Discussions related to Debian GNU/Linux.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 11-12-2004   #1 (permalink)
Just Joined!
 
Join Date: Nov 2004
Posts: 6
Send a message via Yahoo to abarbu
how to run a script at boot time ? (Debian)

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

Reply With Quote
Old 11-12-2004   #2 (permalink)
Linux Guru
 
lakerdonald's Avatar
 
Join Date: Jun 2004
Location: St. Petersburg, FL
Posts: 5,039
place it in /etc/rc5.d/
-lakerdonald
__________________
the lost art of found sound
lakerdonald is offline   Reply With Quote
Old 11-12-2004   #3 (permalink)
Linux Engineer
 
Join Date: Nov 2002
Location: Queens, NY
Posts: 1,319
Send a message via AIM to bpark
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.
bpark is offline   Reply With Quote
Old 11-12-2004   #4 (permalink)
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...
__________________
the lost art of found sound
lakerdonald is offline   Reply With Quote
Old 11-12-2004   #5 (permalink)
Linux Engineer
 
Join Date: Nov 2002
Location: Queens, NY
Posts: 1,319
Send a message via AIM to bpark
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.
bpark is offline   Reply With Quote
Old 11-12-2004   #6 (permalink)
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
__________________
the lost art of found sound
lakerdonald is offline   Reply With Quote
Old 11-12-2004   #7 (permalink)
Just Joined!
 
Join Date: Nov 2004
Posts: 6
Send a message via Yahoo to abarbu
i've done it. i put my script in /etc/init.d and update-rc.d myscript default 80
thanks
abarbu is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Free Network Mapping Tool for Microsoft® Office Visio® Professional 2007 Users
Don't map your network by hand – let LANsurveyor Express for Microsoft Visio Professional 2007 automatically create network diagrams for you.
subscribe
Free eBook:"Vulnerability Management for Dummies"
Get all the Facts and See How to Implement a Successful Vulnerability Management Program.
subscribe
Google vs The World: The Battle of the Message Security Vendors
With such a powerful name behind it, Google Message Security stands out in a sea of products that do exactly the same thing - or so they say.
subscribe

Safe, Secure Backup


All times are GMT. The time now is 01:13 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2