Project

General

Profile

Bug #5911 » debian-mon-create.py.patch

use lsb module to get init - Mark Kirkwood, 08/09/2013 11:12 PM

View differences:

ceph_deploy/hosts/debian/mon/create.py
from ceph_deploy.util.wrappers import check_call
from ceph_deploy.hosts import common
from ceph_deploy import lsb
def create(distro, logger, args, monitor_keyring):
hostname = distro.sudo_conn.modules.socket.gethostname().split('.')[0]
common.mon_create(distro, logger, args, monitor_keyring, hostname)
init = lsb.choose_init(distro.name, distro.codename)
if distro.name.lower() == 'ubuntu':
if init == 'upstart':
check_call(
distro.sudo_conn,
logger,
......
],
)
else: # Debian doesn't use initctl
else: # use sysv
service = common.which_service(distro.sudo_conn, logger)
check_call(
(2-2/4)