#!/bin/bash
set -e
. /build/buildconfig
. /build/bash-library


status "Adding container utlities..."

## Add THE "bash library" into the system
mkdir /usr/local/share/cyLEDGE
cp /build/bash-library /usr/local/share/cyLEDGE/bash-library


## Switch default shell to bash
ln -sf /bin/bash /bin/sh


## This tool runs a command as another user and sets $HOME.
cp /build/bin/setuser /sbin/setuser


## Add the host ip detector as startup script
cp /build/bin/detect-docker-host-ip /etc/my_init.d/

## Set python executable
ln -s /usr/bin/python3 /usr/bin/python

#!/bin/bash
set -e
. /build/buildconfig
. /build/bash-library


status "Adding container utlities..."

## Add THE "bash library" into the system
mkdir /usr/local/share/cyLEDGE
cp /build/bash-library /usr/local/share/cyLEDGE/bash-library


## Switch default shell to bash
ln -sf /bin/bash /bin/sh


## This tool runs a command as another user and sets $HOME.
cp /build/bin/setuser /sbin/setuser


## Add the host ip detector as startup script
cp /build/bin/detect-docker-host-ip /etc/my_init.d/

. /etc/lsb-release
if [ $DISTRIB_RELEASE != "12.04" ]; then
  ## Set python executable
  ln -s /usr/bin/python3 /usr/bin/python
fi

Apply fix for python executable only for releases > 12.04
Apply fix for python executable only for releases > 12.04
