import mon  # noqa
from install import install, mirror_install, repo_install  # noqa
from uninstall import uninstall  # noqa
import logging

from ceph_deploy.util import pkg_managers

# Allow to set some information about this distro
#

log = logging.getLogger(__name__)

distro = None
release = None
codename = None

def choose_init(module):
    """
    Select a init system

    Returns the name of a init system (upstart, sysvinit ...).
    """
    init_mapping = { '11' : 'sysvinit', # SLE_11
        '12' : 'systemd',               # SLE_12
        '13.1' : 'systemd',             # openSUSE_13.1
        }
    return init_mapping.get(release, 'sysvinit')


def get_packager(module):
    return pkg_managers.Zypper(module)

import mon  # noqa
from install import install, mirror_install, repo_install  # noqa
from uninstall import uninstall  # noqa
import logging

from ceph_deploy.util import pkg_managers

# Allow to set some information about this distro
#

log = logging.getLogger(__name__)

distro = None
release = None
codename = None

def choose_init(module):
    """
    Select a init system

    Returns the name of a init system (upstart, sysvinit ...).
    """
    init_mapping = { '11' : 'sysvinit', # SLE_11
        '12' : 'systemd',               # SLE_12
        '13.1' : 'systemd',             # openSUSE_13.1
        }
    return init_mapping.get(release, 'systemd')


def get_packager(module):
    return pkg_managers.Zypper(module)

Set default init to systemd for (open)SUSE
[RM-14742] Set default init to systemd for (open)SUSE

(open)SUSE is now using systemd moving forward, this patch corrects behavior
on Tumbleweed and LEAP

openSUSE Tumbleweed distribution is a pure rolling release version of openSUSE
running the latest packages.

openSUSE LEAP is a rolling release version of openSUSE based on SUSE linux
Enterprise.

Signed-off-by:  Owen Synge <ea78e0e20fce5319fd66b8fd4f543d9e30ef46a5@suse.com>
