[talk] classifying BSD init

Justin Sherrill justin at shiningsilence.com
Sun Aug 30 13:13:20 EDT 2015


Don't forget DragonFly, which does not end with "BSD".  (And is rcconf)
On Aug 30, 2015 12:33 PM, "Brian Coca" <briancoca+nycbug at gmail.com> wrote:

> Hi all,
>
> As part of my work on Ansible I wanted to revamp init system detection
> and break the current monolithic service plugin into smaller more
> targeted ones (systemd, upstart, sysv, etc). Since the BSD support is
> important to me (and hopefully others) I wanted to ask the community
> how I should break this down.
>
> What makes more sense? A unified bsdinit plugin that accounts for the
> differences on each system or independent plugins? Are There are
> enough differences in options that the user interface might become too
> complicated?
>
> 99% of my BSD usage has been FreeBSD with some OpenBSD, so I'm not
> sure on how much the daemon control systems differ across these and
> other BSD distributions.
>
> The following is my detection code (python).
>
> Currently I'm using this (which can also just be the fallback):
>
>         elif  self.facts['system'].endswith('BSD'):
>                 self.facts['service_mgr'] = 'bsdinit'
>
> But I was thinking in the lines of this:
>
>         elif self.facts['system'] == 'FreeBSD':
>                 self.facts['service_mgr'] = 'rcconf'
>         elif self.facts['system'] == 'NetBSD':
>                 self.facts['service_mgr'] = 'rcd'
>         elif self.facts['system'] == 'OpenBSD':
>                 self.facts['service_mgr'] = 'rcctl'
>         elif  self.facts['system'].endswith('BSD'):
>                 self.facts['service_mgr'] = 'bsdinit'
>
>
> This will also impact on how I break down the current service plugin.
>
> You can look at the current BSD support starting here:
>
> https://github.com/ansible/ansible-modules-core/blob/devel/system/service.py#L942
>
> Any info about other BSD init systems is also welcome.
>
>
> Thanks in advance,
>
> ------------
> Brian Coca
>
> _______________________________________________
> talk mailing list
> talk at lists.nycbug.org
> http://lists.nycbug.org/mailman/listinfo/talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nycbug.org/pipermail/talk/attachments/20150830/8ef7ccd2/attachment.html>


More information about the talk mailing list