ceph-disk: tolerate /sbin/service or /usr/sbin/service

CentOS/RH has it in /sbin, others in /usr/sbin.

Backport: bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2013-04-30 14:16:04 -07:00
parent c2bcc2a60c
commit cd1d6fb3f9

View File

@ -1311,9 +1311,13 @@ def start_daemon(
],
)
elif os.path.exists(os.path.join(path, 'sysvinit')):
if os.path.exists('/usr/sbin/service'):
svc = '/usr/sbin/service'
else:
svc = '/sbin/service'
subprocess.check_call(
args=[
'/usr/sbin/service',
svc,
'ceph',
'start',
'osd.{osd_id}'.format(osd_id=osd_id),