LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-23-2011, 01:27 AM   #1
JackL92
LQ Newbie
 
Registered: Jun 2011
Posts: 11

Rep: Reputation: Disabled
Linux startup rc.local problem


I am having big trouble with rc.local on my system.
My system is CentOS 5.5 64X

My default startup is is 3, so rc3.d is where I was looking into.
rc.local with permissions 755.

Inorder to solve the problem I made the following test.
1. No matter how I edit rc.local, it will not be executed, even a copy from other Linux system that runs rc.local fine.

2. All S99 service under rc3.d won't run when S99local is there.

3. All service executed just fine if S99local removed from rc3.d.

4. If I change S99local to S97local, Anything in S97, S98, S99 won't run.

5. I tested rc.local with
Code:
echo "rc.local is executed just fine" >> /root/test.txt
by adding it after "touch /var/lock/subsys/local" [FAILED, test.txt not found after restart]

6. I tried to execute rc.local with
Code:
sh /etc/rc.local
it was SUCCESSFULLY executed without any error, and everything in rc.local runs fine.

Below here is my rc.local
Code:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
#
touch /var/lock/subsys/local

echo "rc.local is executed just fine" >> /root/test.txt
I have no idea what is going wrong with my system or my rc.local file. Thank you for helping me!!

Last edited by JackL92; 06-23-2011 at 09:46 AM.
 
Old 06-23-2011, 11:38 AM   #2
lisle2011
Member
 
Registered: Mar 2011
Location: Surrey B.C. Canada (Metro Vancouver)
Distribution: Slackware 2.6.33.4-smp
Posts: 183
Blog Entries: 1

Rep: Reputation: 25
rc.local

if rc.local has the executable bit set all it should take to run it would be:

./rc.local

?

Last edited by lisle2011; 06-23-2011 at 11:38 AM. Reason: sp
 
Old 06-23-2011, 06:49 PM   #3
JackL92
LQ Newbie
 
Registered: Jun 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lisle2011 View Post
if rc.local has the executable bit set all it should take to run it would be:

./rc.local

?
Yea, everything in there runs fine with ./rc.local command.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
starting oracle database in linux at startup using rc.local morad_dba Linux - Newbie 2 08-24-2010 04:03 PM
is it possible system startup miss /etc/rc.d/rc.local ? gtludwig Slackware 6 02-05-2009 07:50 AM
in RedHat linux 9, how can i configure a startup file in /etc/rc.local perathprabha Linux - Newbie 1 03-13-2008 12:42 PM
Startup script not working in rc.local crackerB Linux - Software 9 10-09-2006 07:55 AM
rc.local yes/no option during startup jkassemi Linux - General 2 03-06-2005 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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