#!/bin/sh -e
# Copyright DataStax, Inc.
# Please see the included license file for details.

# This is documented here:
# https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelines

if ! whoami 1>/dev/null 2>&1; then
  if [ -w /etc/passwd ]; then
    echo "${USER_NAME:-cass-operator}:x:$(id -u):$(id -g):${USER_NAME:-cass-operator} user:${HOME}:/sbin/nologin" >> /etc/passwd
  fi
fi

exec run_configbuilder $@
