View Full Version : [SOLVED] Infinite loop in Bash - How to?

October 4th, 2007, 01:59 AM
Normally one would frown upon intentionally programming an infinite loop, but that is exactly what I need to prevent a shell script from exiting when it has "concluded" its task.

So my question is, how do I code an infinite loop in Bash script?

I have been working on the joyful task of producing a bootable CD-R that can either install a customized Linux distro onto the HDD or merely provide the operator with access to a Busybox shell. In either case, when the task is complete, I receive a "Kernel panic - not syncing: Attempted to kill init". I have spent countless days troubleshooting this damn little error that I've concluded that perhaps it would be easier to simply put a "band-aid" over it so that it never occurs.

October 4th, 2007, 02:01 AM
while true; do

edit: fixed the code :)

October 4th, 2007, 02:30 AM
Thanks, that'll work just fine! I'll slap a 'sleep 60' in there for the code-section.