On Sun, Sep 23, 2012 at 1:16 AM, Michael DeHaan
<
michael...@gmail.com> wrote:
> I'd say the service module likely warrants such refactoring. I really would want just one service module and it probably > wouldn't be too complicated (unlike package management).
Actually, I think it's a quite similar scenario to package management.
I say this because of the wide variance of how different platforms
handle services (think freebsd's rc.conf, solaris's smf, gentoo's
rc-update, aix's stopsrc/startsrc, daemontools, runit, etc, etc...),
their differing capabilities and how differently they implement these
features.
For example:
* enabling and disabling a service in aix requires editing /etc/inittab file.
* Solaris SMF does not seperate the act of enabling a service and
starting it. To enable it you have to start it. Same goes for
disabling it. To disable it you have to stop it. (Yes it's silly, but
that's how it works.)
* etc...
Just thinking aloud here to make sure we're on the same page. But my
thoughts are that If we're going to try to keep this as one module I
think it makes sense to have a base service module class and then
different platforms would need to subclass the base class to define
how they implement each of the features. I think this keeps it cleaner
and more maintainable. The tricky part of doing it this way though
would be the best way to determine what arch/platform they are running
on to automatically figure out which service subclass to use.
Thoughts? Suggestions?
--
Romeo