summaryrefslogtreecommitdiffstats
path: root/images/installer/root/usr/local/bin/entrypoint
blob: 777bf3f11c225518e72b17a06de771a6924524ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash -e
#
# This file serves as the main entrypoint to the openshift-ansible image.
#
# For more information see the documentation:
#	https://github.com/openshift/openshift-ansible/blob/master/README_CONTAINER_IMAGE.md


# Patch /etc/passwd file with the current user info.
# The current user's entry must be correctly defined in this file in order for
# the `ssh` command to work within the created container.

if ! whoami &>/dev/null; then
  echo "${USER:-default}:x:$(id -u):$(id -g):Default User:$HOME:/sbin/nologin" >> /etc/passwd
fi

exec "$@"