LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-12-2004, 11:56 AM   #1
brynjarh
Member
 
Registered: May 2004
Location: Iceland
Distribution: Ubuntu Dapper Drake
Posts: 172

Rep: Reputation: 30
The ideal way to run a script at boot?


I have few commands that need to be exectured at boot, it can not be exectued when switching from init levels and it needs to be exectudet by root. What would be the ideal way to do this?

The commands that need to be exectued are:
Code:
route del default
route add -net fjoltengi netmask 255.255.255.255 gateway 10.9.12.1 eth0
pptp fjoltengi name einstein2 lock defaultroute noipdefault nobsdcomp nodeflate novj noaccomp nopcomp noauth debug
The first two lines fix my routing so it is currect, if there is any other way to change how the routing is defined at boot then please tell, and then the third line is to connect to the internet.

Any help would be much apresiated.
 
Old 12-13-2004, 06:21 AM   #2
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
You should be able to put that in the Debian equivalent of the /etc/rc.d/rc.local file, but I don't know what that file would be.
 
Old 12-13-2004, 10:51 AM   #3
zuralin
Member
 
Registered: Sep 2003
Distribution: Debian testing/unstable
Posts: 229

Rep: Reputation: 32
Quote:
Originally posted by /bin/bash
You should be able to put that in the Debian equivalent of the /etc/rc.d/rc.local file, but I don't know what that file would be.
There isn't one. Look into using update-rc.d and make your own.

# man update-rc.d
 
Old 12-13-2004, 02:42 PM   #4
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Rep: Reputation: 101Reputation: 101
This page describes creating a Debian rc.local equivalent: http://www.desktop-linux.net/debian-rclocal.htm
 
Old 12-13-2004, 11:44 PM   #5
NetSnake
LQ Newbie
 
Registered: Sep 2004
Location: China
Distribution: Debian 3.0r2 unstable
Posts: 28

Rep: Reputation: 15
You can write a shell script yourself at /etc/init.d/, and create a link from it to /etc/rc2.d
with a S??<script_name>.
Look out /etc/init.d/ and /etc/rc?.d, you will know what are we doing.

Last edited by NetSnake; 12-13-2004 at 11:45 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get script to run on boot Ook Slackware 7 03-05-2005 01:31 AM
Script to run at boot robbow52 Debian 17 09-03-2004 09:04 PM
Script won't run at boot bugsbunny Slackware - Installation 6 04-19-2004 04:26 PM
Run a script at boot, RH 7.2 dsheller Linux - Newbie 2 01-24-2004 09:12 PM
Can't get script to run on boot rickenbacherus Linux - General 5 08-21-2003 10:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration