Beispiel #1
0
def init_is_systemd(service_name=None):
    """
    Returns whether the host uses systemd for the specified service.

    @param Optional[str] service_name: specific name of service
    """
    if str(service_name).startswith("snap."):
        return True
    if lsb_release()['DISTRIB_CODENAME'] == 'trusty':
        return False
    return os.path.isdir(SYSTEMD_SYSTEM)
Beispiel #2
0
def init_is_systemd():
    """Return True if the host system uses systemd, False otherwise."""
    if lsb_release()['DISTRIB_CODENAME'] == 'trusty':
        return False
    return os.path.isdir(SYSTEMD_SYSTEM)
Beispiel #3
0
def init_is_systemd():
    """Return True if the host system uses systemd, False otherwise."""
    if lsb_release()['DISTRIB_CODENAME'] == 'trusty':
        return False
    return os.path.isdir(SYSTEMD_SYSTEM)