Exiting out of an infinite reboot loop
I am creating a startup script (called from rc.local) in Debian Squeeze.
The startup script checks from a variable value from a file, decrements
the variable and writes it back to the file, then if the variable was
greater than 0 then it executes a test and reboots the system. If the
variable is 0 or less than 0, then it doesn't reboot the system. My
question is as follows: Suppose I realize after a couple of tests that
there is a bug in the test. Is there any way to break the
execute_test->reboot->repeat loop that I have set up. Putting a "sleep
1000" in the test or doing a ps aux|grep might work, but I am not sure if
I shall have access to them before the rc.local scripts have run. What if
I run the script in the background instead of the foreground? Would I have
access to bash login shell etc. while the test is running in the
background in that case?
I know I have given very few details, since I am not sure what information
would be required. I will update the question as required.
No comments:
Post a Comment