LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 07-03-2014, 01:55 AM   #1
paulus89
LQ Newbie
 
Registered: Jun 2014
Posts: 26

Rep: Reputation: Disabled
how to change rc.local


Dear All,

I have changed rc.local file and now my CentOs 6.5 x64 hang.. and unable to start.. how to recover this?

please help

thanks
pau
 
Old 07-03-2014, 02:00 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
what you changed in rc.local?
by default its look like,
Quote:
#!/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
mount -o remount /dev/shm
 
Old 07-03-2014, 02:02 AM   #3
paulus89
LQ Newbie
 
Registered: Jun 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
I call openvpn --config client.ovpn

it stuck there .. and I want to remove that line now .. but no luck ..please help
thank you
 
Old 07-03-2014, 02:34 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
What do you mean you cant login to the server?
login to the server and remove the line form rc.local
manually run and make sure the openvpn first
 
Old 07-03-2014, 02:39 AM   #5
paulus89
LQ Newbie
 
Registered: Jun 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
yes, I am unable to login to the server and remove that line
 
Old 07-03-2014, 02:46 AM   #6
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
You could boot from the install media and pick rescue mode, this will let you mount the existing file-system and allow you to edit the file.
 
Old 07-03-2014, 03:04 AM   #7
paulus89
LQ Newbie
 
Registered: Jun 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
noted and thanks to all
 
Old 07-03-2014, 03:37 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Did you try to boot into single user mode and change the file? You should be able to boot into single user mode by passing relevant parameters to the kernel from grub.
 
Old 07-03-2014, 03:43 AM   #9
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
From memory (so I may be wrong!), "single user" will still run init files including rc.local, just at the appropriate run level, "emergency" will start up but not run init.
 
Old 07-03-2014, 06:04 AM   #10
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Single user mode only runs processes designated for single user operation - rc.local is not supposed to be one of those, neither are any of the startup scripts. Basically it should just run "login root" or "bash" - only the root filesystem would be mounted.
 
  


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
mailx change local domain nivek311 Linux - Newbie 1 01-16-2012 03:53 AM
how local user able to change password? dickysolo Linux - Security 3 10-29-2007 03:39 AM
How can i change my local host? Jose Santos Linux - Newbie 1 05-26-2005 04:15 AM
Local language change Carroarmato0 Mandriva 2 03-10-2005 11:28 AM
Local Host Name Change!! jarmstrong Linux - General 9 12-21-2002 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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