mon: fix `ExecStartPre` option in systemd unit file

This command line is not supported.
According to official documentation:

```
Note that shell command lines are not directly supported.
If shell command lines are to be used,
they need to be passed explicitly to a shell implementation of some kind.
```

We must run this using /bin/sh instead.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/3111/head
Guillaume Abrioux 2018-09-06 14:00:13 +02:00
parent 9ff26e80f2
commit 1c88c444a3
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ After=docker.service
[Service]
EnvironmentFile=-/etc/environment
ExecStartPre=-/usr/bin/docker rm ceph-mon-%i
ExecStartPre=$(command -v mkdir) -p /etc/ceph /var/lib/ceph/mon
ExecStartPre=/bin/sh -c '"$(command -v mkdir)" -p /etc/ceph /var/lib/ceph/mon'
ExecStart=/usr/bin/docker run --rm --name ceph-mon-%i \
--memory={{ ceph_mon_docker_memory_limit }} \
{% if ceph_docker_version.split('.')[0] | version_compare('13', '>=') -%}