generic init.d: stat not portable. Issue #1815

The `stat` utility tends to vary across *nixes. This relies instead upon the
hopefully more portable `ls` and `cut` commands to determine ownership and
permission modes.
generic init.d: fix forgotten dashes. Issue #1815
Merge branch 'OEP/fix-inits'