[talk] classifying BSD init

John C. Vernaleo john at netpurgatory.com
Sun Aug 30 17:50:10 EDT 2015


Bitrig also doesn't end with *BSD (which has been a huge source of trouble 
for me with ports) but is likely to work with things OpenBSD works with.

John

-------------------------------------------------------
John C. Vernaleo, Ph.D.
www.netpurgatory.com
john at netpurgatory.com
-------------------------------------------------------

On Sun, 30 Aug 2015, Justin Sherrill wrote:

> 
> 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.p
>       y#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
> 
> 
>


More information about the talk mailing list