Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-10-2003, 03:50 AM   #1
LQ Newbie
Registered: Jul 2003
Posts: 10

Rep: Reputation: 0
Where is system's startup script directory

Can help me where is Linux RH system's startup script directory? thanks.
Old 07-10-2003, 04:05 AM   #2
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Rep: Reputation: 31
I forgot but I would suggest searching for /etc/rc.sysinit

Others will come up with this.

Qu Chen
Old 07-10-2003, 12:33 PM   #3
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
It depends on the version I believe. But if you poke around in /etc/ and look for rc anything, those are usually your startup scripts
/etc/rc.d/ is a possibility.

Old 07-11-2003, 01:18 AM   #4
LQ Newbie
Registered: Jul 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Hi, Thanks for your help.
can i just create a file called "Test". This file contain some script such as:
#samba startup deamon
case "$1" in
if [ -f /usr/local/samba/bin/smbd -a -f /usr/local/samba/lib/smb.conf]; then
/usr/local/samba/bin/smbd -D
/usr/local/samba/bin/nmbd -D
echo "Usage: $0 start"
exit 1

will it works if i save it in /etc/rc.d ? or i have to insert the above script in rc.sysinit?
Any help man to understand startup directory?
Old 07-11-2003, 01:30 AM   #5
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
Not that I am aware of (the man page to help understand startup dir) however you might find some discussion on sysVinit around the board and on

As for "create file Test with code" and just place it in that directory, not likely. You probably have runlevel directories though (rc.3 or rc3.d) that correspond to your current runlevel (to find out check /etc/inittab and look for id:3:default or something similar, might be 5) and you could do what you are wanting there. Make sure it's executable though.

What I'd suggest is finding an rc.local file and using that instead. Almost every distro I've used has one, run a search:
find / rc.local
locate rc.local
Inside there you can do what you are wanting, this file is exactly for what you are looking to do.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 03:53 AM
How to call a script from a system startup script? jonatito Linux - Newbie 7 11-11-2005 10:40 PM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-12-2005 12:08 AM
shell script: delete all directories named directory.# except directory.N brian0918 Programming 3 07-13-2005 07:54 PM
startup script c0c0deuz Linux - Newbie 3 03-29-2003 04:26 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:27 PM.

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