inittab always restarts a process which was commented out

I have a script that reads the /etc/inittab file and puts a # in front of the line with my program. Then I do a "init q". But the process is restarted at once. :confused: I need the process stopped, because I want to replace the binary!

Who can advise?

init does not support any way of commenting out a line from inittab. And removing the line would not be the right thing to do anyway. Edit the action field and change "respawn" to "off". Then "init q" will cause init to immediately kill the process in question and it won't restart it. Change it back to respawn and do another "init q" to get it going again after you replace the binary.

In the meanwhile I found out that another process did a "init q" with the "inittab-before-the-modifying".

I found it easier to add only a comment than changing "respawn" to "off". :o

Thanks for helping.