LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-30-2006, 10:09 PM   #1
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Rep: Reputation: 30
init.d


-does all the scripts in the /etc/init.d runs automatically when linux boots up?
 
Old 10-30-2006, 10:17 PM   #2
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
A lot of them do, but not all of them. Some of them are set to and some aren't. And of course all of this can be changed, scripts can be added and scripts can be removed. Just because the script is in that directory though dosen't mean it will be automatically run.
 
Old 10-30-2006, 11:26 PM   #3
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
-ok
-so how can i make a script in init.d runs automatically when linux boots up?
 
Old 10-31-2006, 12:37 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by SBN
-ok
-so how can i make a script in init.d runs automatically when linux boots up?
Look in /etc to find a set of directories named rc1.d, rc2.d, etc. These contain links to the scripts in init.d
Each of these corresponds to a "runlevel". the runlevel to use on bootup is specified in /etc/inittab, like so:
id:5:initdefault:

This says to start in runlevel 5. Init then goes to rc5.d and runs the links to the actual scripts in init.d the links are prefaced with "K" for kill, or "S" for start--followed by a number. These links are followed in ALPHABETICAL order--not numerical. The S and K prefixes cause arguments to be passed to the scripts.

If you are not yet confused, then we have failed....
 
Old 10-31-2006, 03:47 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally Posted by SBN
-ok
-so how can i make a script in init.d runs automatically when linux boots up?
On which Linux distribution because this can differ between distros.
 
Old 10-31-2006, 09:09 PM   #6
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
-i am trying both on UBUNTU and CentOS...
 
Old 10-31-2006, 09:22 PM   #7
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
the modern way on the debian system is to use the command
update-rc.d
to manipulate the startup links
see man update-rc.d
 
Old 10-31-2006, 10:05 PM   #8
kryptobs2000
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 306

Rep: Reputation: 30
where could I put a command to run after I startx at? I just need it to launch a program (azureus) and to change my mouse settings (xset m 0 0)? Running slackware 10.2 btw.
 
Old 11-01-2006, 03:32 AM   #9
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally Posted by SBN
-i am trying both on UBUNTU and CentOS...
On CentOS, you can use the "chkconfig" command. Run "man chkconfig" to find out how to use it.
 
Old 11-01-2006, 07:44 PM   #10
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
-ok noted...but how about in ubuntu?
 
Old 11-01-2006, 08:40 PM   #11
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
Did you try the commands already given to you by studioj??
 
Old 11-02-2006, 08:40 PM   #12
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
-yes i am trying but i have a hard time understanding it.
-i have copied my script to /etc/init.d and tried this on the terminal "$ updated-rc.d startme start" (startme is my script) but it wont work something is missing on my command and i dont know what it is...
-is there other ways run my script upon linux boot?
 
  


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
Kernel Panic No init found. Try passing init..... Adrian Baker Mandriva 2 02-28-2005 11:47 AM
Redhat linux9.0:System hangs,if gives init 3 or init 4 Sailaja Reddy Linux - Newbie 4 09-16-2004 03:19 AM
Kernal Panic: No init found. Try passing init= option to kernel raees Linux - General 12 03-18-2004 11:10 PM
error: No init found. Try passing the init= option to the Kernel neylitalo Linux - Laptop and Netbook 3 01-22-2004 09:34 PM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:00 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