diff options
author | Christian Heimes <cheimes@redhat.com> | 2020-08-11 11:29:49 +0200 |
---|---|---|
committer | Christian Heimes <cheimes@redhat.com> | 2020-08-11 11:41:14 +0200 |
commit | 1ae8d2f096e323ad71a8cf8aaf1800d23f29181e (patch) | |
tree | 797c938b81907cf6457a40425e0feb225aa72d7b /pkg/varlinkapi | |
parent | a90ae00df1c2be0f3d46d4e7cd292599c93ded0f (diff) | |
download | podman-1ae8d2f096e323ad71a8cf8aaf1800d23f29181e.tar.gz podman-1ae8d2f096e323ad71a8cf8aaf1800d23f29181e.tar.bz2 podman-1ae8d2f096e323ad71a8cf8aaf1800d23f29181e.zip |
Enable systemd mode for /usr/local/sbin/init
Podman 1.6.2 changed systemd mode auto-detection from commands ending in
``init`` to hard-coded paths ``/sbin/init`` and ``/usr/sbin/init``. This
broke FreeIPA container. ``podman run`` and ``podman create`` now
activate systemd mode when the command is ``/usr/local/sbin/init``.
Fixes: https://github.com/containers/podman/issues/7287
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r-- | pkg/varlinkapi/create.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/varlinkapi/create.go b/pkg/varlinkapi/create.go index 2d3e20f67..2a39477a6 100644 --- a/pkg/varlinkapi/create.go +++ b/pkg/varlinkapi/create.go @@ -704,7 +704,7 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod. if err != nil { return nil, errors.Wrapf(err, "cannot parse bool %s", c.String("systemd")) } - if x && (command[0] == "/usr/sbin/init" || command[0] == "/sbin/init" || (filepath.Base(command[0]) == "systemd")) { + if x && (command[0] == "/usr/sbin/init" || command[0] == "/sbin/init" || command[0] == "/usr/local/sbin/init" || (filepath.Base(command[0]) == "systemd")) { systemd = true } } |