>>Have you actually tried to maintain a meaningful cross-distro init script?
>Why, yes. Yes, I have. Our (commercial) product runs on all flavors of Linux as well as any UNIX-like system (the BSDs, Solaris, etc.)
Yay!
>I did the rather heretical thing of writing our init script in Perl. Our product requires Perl anyway, so we know that Perl is going to be available on the system. And it was quite easy.
Perl makes some things easier (if nothing else, it has real data structures!) but it doesn't simplify integrating into the rest of the system.
Indeed, I couldn't even rely on having *bash* because among the targets for aforementioned init scripts were embedded systems with 4MB flash -- certainly no room for perl either)
In my case I had to integrate into/with distro networking layers, which was about as insane as things could get.