Another option for the patch is:
+ "# Generated by LTSP, for LDM rc.d script manipulation\n$s:!!\\?:%s:",
This was recommended by quinox1 on IRC.
Another option for the patch is:
+ "# Generated by LTSP, for LDM rc.d script manipulation\ n$s:!!\ \?:%s:" ,
This was recommended by quinox1 on IRC.