[talk] classifying BSD init

Brian Coca briancoca+nycbug at gmail.com
Sun Aug 30 12:31:26 EDT 2015

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

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:

Any info about other BSD init systems is also welcome.

Thanks in advance,

Brian Coca

More information about the talk mailing list