LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-06-2004, 05:33 PM   #1
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
Quick Startup Question


Up until recently I have been adding things to my startup scripts simply appending them to my /etc/rc.d/rc.local file. I realize now that this is not the best way to go about it. As I understand it, if you have a script in /etc/rc.d/init.d, then you can simply link it into the correct runlevel directory (/etc/rc.d/rc#.d where # is the runlevel) and name the link S##<name> where ## is a two-digit number determining the order in which the scripts are run in that runlevel, the 'S' indicates that it will be run with the "START" (i.e. service <name> START) and <name>, of course, is the name of the service.

So, I'm trying this for the first time. It tried migrating my smbd and nmbd daemon starts to runlevel 3. So, I had the following two lines in my /etc/rc.d/rc.local file:

smbd -D
nmbd -D

I remarked those out and linked the /etc/rc.d/init.d/smb script into the /etc/rc.d/rc3.d directory with the following commands:

# pwd
/etc/rc.d/rc3.d
# cp -s /etc/rc.d/init.d/smb ./S35smb
# ls
..
S35smb
..

I restarted the machine and the services were not running. What should I check? Am I completely misunderstanding this? I know that Redhat startups are pretty notorious for having more than one copy of the same startup files (like ifcfg-eth#) and having only one of them count. Is this another one of those cases?

(Oh, and guess since I haven't mentioned it yet, I run RedHat 9)
 
Old 06-06-2004, 05:40 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Re: Quick Startup Question

What does "/etc/rc.d/init.d/smb" contain? Is it an executable script?

Quote:
Originally posted by gauge73
(Oh, and guess since I haven't mentioned it yet, I run RedHat 9)
You might want to update your profile - it still says 8
 
Old 06-06-2004, 05:53 PM   #3
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Well, I looked at it, and where most of the scripts (actually, all the ones I saw) in the /etc/rc.d/init.d directory have the following line:

start() { ..

The smb script has a case statement like so...

case "$1" in
..
start) ..
..
;;
..
esac

I was able to start the service with the following commnd:

# service smb start

Anything else I should look into?
 
Old 06-06-2004, 06:14 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
What about the permissions? is it executable:
ls -l /etc/rc.d/init.d/smb
 
Old 06-06-2004, 06:32 PM   #5
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
755 root:root
 
Old 06-07-2004, 10:22 AM   #6
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
*bump*
 
  


Reply


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
Support for Suspend, Hibernate or other quick shutdown/startup options DavidIanWarren Linux - Laptop and Netbook 2 06-23-2004 08:20 AM
Question Concerning ISO's and one quick question. evrae Linux - Software 2 06-21-2004 04:53 AM
quick question about startup radont84 Linux - General 1 04-13-2004 04:40 AM
samba smb.config question (quick question) TheDOGG Linux - Networking 1 03-02-2004 08:19 AM
quick startup question eyek Red Hat 5 12-02-2003 09:24 PM


All times are GMT -5. The time now is 05:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration