Kodi Community Forum

Full Version: [LIVE] Preventing etc/rc.local from execution during boot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi folks,

After enjoy my entire evening and feeliing myself as the king of the world, I fell down from my ivory tower.
Through this forum I managed to make my DTS/DOLBY SPDIF works, set up the resolution with xconf.org but a simple annoying thing was missing: Whenever I shutdown through XBMC GUI, it just exits from it, posting the XBMC Login terminal tty1 screen, when all I wanted was to "shutdown -H -P now", for real.

Then, I decided to include a command on my rc.local autorun script

after everything done, it means, runonce xbmc, prior to exit0, I included the shutdown -H -P now line.

I´m my perception, after execute XBMC, it would perform just like an autoexec.bat, and get back to script, and really shutdown my pc. Poor NooB.

Now, it starts XBMC and immediately shutdown, as I kindly asked him to do.

Is there a way to prevent the rc.local from running (an ESC, CTRL-X, CTRL-C, Fx key), while loading so I can edit and remove this line from it ?

I´ve tried to be quicker than the boot process, logging from a remote machine, but it always wins... when I manage to log the terminal, type sudo nano /etc/rc.local ... it starts to shutdown...Shocked

Any ideas ? I really didn´t wanted to start all over again.

Cheers,
K.
I won !!! Big Grin
I could inject a terminal script to edit rc.local while is was shutting down.Nod

Either way... Any ideas ?
kadiblov Wrote:I won !!! Big Grin
I could inject a terminal script to edit rc.local while is was shutting down.Nod

Either way... Any ideas ?

Boot a live cd, mount the hard drive and modify the file. Reboot.
Add the work "single" to your kernel command in the grub menu before booting.

This will prevent all services and init scripts from executing.
Thanks JumJum !Nod

The `single´ trick worked as expected !

Thanks a bunch.
K.