mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
Merge pull request #7579 from javacruft/wip-systemd-escaping
systemd: correctly escape block device paths Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
88d251475b
@ -3854,7 +3854,7 @@ def main_trigger(args):
|
||||
LOG.debug("main_trigger: " + str(args))
|
||||
if is_systemd() and not args.sync:
|
||||
# http://www.freedesktop.org/software/systemd/man/systemd-escape.html
|
||||
escaped_dev = args.dev.replace('-', '\\x2d')
|
||||
escaped_dev = args.dev[1:].replace('-', '\\x2d')
|
||||
service = 'ceph-disk@{dev}.service'.format(dev=escaped_dev)
|
||||
LOG.info('systemd detected, triggering %s' % service)
|
||||
command(
|
||||
|
Loading…
Reference in New Issue
Block a user