Improve error handling for init.d script (fix #187)
Merge branch 'atnnn_187' into next