Missed some rows
Missed some rows
Posted Apr 29, 2011 22:44 UTC (Fri) by dskoll (subscriber, #1630)In reply to: Missed some rows by mezcalero
Parent article: Poettering: Why systemd?
Most (all?) upstream software I have seen which ships init scripts has different init script implementations for the different distributions.
We use the same init script across all our Linux distros (and even on the BSDs) for our commercial product.
That being said, our product is largely written in Perl, so we wrote the init script in Perl too. That might make some recoil in horror, but it simplifies our life quite a bit, and since you need Perl to run our product anyway... :)
Posted Apr 29, 2011 23:06 UTC (Fri)
by jspaleta (subscriber, #50639)
[Link] (4 responses)
Do you have any conditional logic in your perl based init script which fires depending on the environment your script ends up running under?
I don't think he was claiming that it is impossible, I believe the claim is one of pragmatic realities of the accumulating differences across distributions makes a strawman out of any argument about assuming perfect portable initscripts commonly found in the wild.
-jef
Posted Apr 29, 2011 23:19 UTC (Fri)
by dlang (guest, #313)
[Link]
the distro maintainers don't like them, but the software is unconditionally put in one place, no matter what OS it is (frequently under /opt) and the init scripts start and stop the application without any problems.
this isn't just for trivial apps either, all it takes is a decision that you don't care what the 'normal' thing for this particular platform is, (frequently on the basis that the platform is just there to support the application, which is commonly valid) and you don't have to worry very much about the variations between platforms.
Posted Apr 30, 2011 2:59 UTC (Sat)
by dskoll (subscriber, #1630)
[Link] (2 responses)
Do you believe that the care and effort you put into the portability of your init script is typical or atypical?
Oh, hey, I'm all for systemd. I think it's a great idea. It won't help us on non-Linux platforms, though. (At least not for a while...)
Do you have any conditional logic in your perl based init script which fires depending on the environment your script ends up running under?
Nope. The Perl stuff is used so we can have pluggable components to start different executables depending on what's installed and on how the particular node is configured. It also rationalizes PATH handling, but there's no platform-specific code.
Posted Apr 30, 2011 19:49 UTC (Sat)
by rvfh (guest, #31018)
[Link] (1 responses)
Posted May 1, 2011 6:40 UTC (Sun)
by dskoll (subscriber, #1630)
[Link]
Question is: how will this work with systemd?
I can't imagine there will be any problems. To the outside world, our script looks like a normal sysvinit script:
script start
script stop
etc...
Missed some rows
Missed some rows
Missed some rows
Managing programs startup using a perl script
Managing programs startup using a perl script