LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to change rc.local (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-change-rc-local-4175509938/)

paulus89 07-03-2014 01:55 AM

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

kirukan 07-03-2014 02:00 AM

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

paulus89 07-03-2014 02:02 AM

I call openvpn --config client.ovpn

it stuck there :( .. and I want to remove that line now .. but no luck :( ..please help
thank you

kirukan 07-03-2014 02:34 AM

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

paulus89 07-03-2014 02:39 AM

yes, I am unable to login to the server and remove that line

TenTenths 07-03-2014 02:46 AM

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.

paulus89 07-03-2014 03:04 AM

noted and thanks to all :)

linuxlover.chaitanya 07-03-2014 03:37 AM

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.

TenTenths 07-03-2014 03:43 AM

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.

jpollard 07-03-2014 06:04 AM

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.


All times are GMT -5. The time now is 12:39 AM.