From: 胡玮文 Date: Wed, 7 Apr 2021 13:18:52 +0000 (+0800) Subject: cephadm: cleanup extra slash in runtime dir X-Git-Tag: v16.2.2~1^2~59 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=94b95fc433833197da2e94bb207c61ccc9f22cdc;p=ceph.git cephadm: cleanup extra slash in runtime dir %t already contains a slash, no need to add an extra one Signed-off-by: 胡玮文 (cherry picked from commit 9a864f086bedb7098060637ffb27ccc5dc92a88b) --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 67a060c2842a..25c4be5437bc 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2991,10 +2991,10 @@ def get_unit_file(ctx, fsid): # type: (CephadmContext, str) -> str extra_args = '' if isinstance(ctx.container_engine, Podman): - extra_args = ('ExecStartPre=-/bin/rm -f /%t/%n-pid /%t/%n-cid\n' - 'ExecStopPost=-/bin/rm -f /%t/%n-pid /%t/%n-cid\n' + extra_args = ('ExecStartPre=-/bin/rm -f %t/%n-pid %t/%n-cid\n' + 'ExecStopPost=-/bin/rm -f %t/%n-pid %t/%n-cid\n' 'Type=forking\n' - 'PIDFile=/%t/%n-pid\n') + 'PIDFile=%t/%n-pid\n') if ctx.container_engine.version >= CGROUPS_SPLIT_PODMAN_VERSION: extra_args += 'Delegate=yes\n'