]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: cleanup extra slash in runtime dir
author胡玮文 <huww98@outlook.com>
Wed, 7 Apr 2021 13:18:52 +0000 (21:18 +0800)
committerSage Weil <sage@newdream.net>
Fri, 23 Apr 2021 12:24:13 +0000 (07:24 -0500)
%t already contains a slash, no need to add an extra one

Signed-off-by: 胡玮文 <huww98@outlook.com>
(cherry picked from commit 9a864f086bedb7098060637ffb27ccc5dc92a88b)

src/cephadm/cephadm

index 67a060c2842a534c9601878efe5a4c1efad04a03..25c4be5437bc5c7f0a8007fffbdd9aa7c54f6f22 100755 (executable)
@@ -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'