uci-docker-build/src/init/bin/base-start

19 lines
358 B
Bash
Executable File

#!/bin/bash
# echo arguments in start script: "$@"
source /opt/env/run.env
source /opt/bin/host-id-map.sh
case "$1" in
cmd)
shift 1
"$@"
;;
script)
shift 1
module_load path
script=$([[ $(isAbsPath $1) ]] && echo $1 || echo opt/bin/$1)
shift 1
/bin/bash $script "$@"
;;
*)
/bin/bash -c "cd ${INITIAL_DIR:-$HOME}; exec bash -l"
esac