From 1af7a22460dafe12f22f9b564d946f3d583f4cb0 Mon Sep 17 00:00:00 2001 From: startxfr Date: Sun, 6 Dec 2015 03:44:47 +0100 Subject: debuging images and improve startup display --- OS/sx-lib.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'OS/sx-lib.sh') diff --git a/OS/sx-lib.sh b/OS/sx-lib.sh index 7d6aac2..0df6f9c 100644 --- a/OS/sx-lib.sh +++ b/OS/sx-lib.sh @@ -16,8 +16,10 @@ function check_environment { echo "! WARNING : auto-assigned value : $CONTAINER_SERVICE" fi if [ ! -v CONTAINER_INSTANCE ]; then - echo "ERROR : environment var CONTAINER_INSTANCE is missing. EXIT !!!" - exit 1; + CONTAINER_INSTANCE=$CONTAINER_TYPE "_" $CONTAINER_SERVICE; + export CONTAINER_INSTANCE; + echo "! WARNING : environment var CONTAINER_INSTANCE is missing..." + echo "! WARNING : auto-assigned value : $CONTAINER_INSTANCE" fi } @@ -28,12 +30,12 @@ function display_container_header { if [ -v CONTAINER_TYPE ]; then echo "| Type : $CONTAINER_TYPE" fi - if [ -v CONTAINER_INSTANCE ]; then - echo "| Instance : $CONTAINER_INSTANCE" - fi if [ -v CONTAINER_SERVICE ]; then echo "| Service : $CONTAINER_SERVICE" fi + if [ -v CONTAINER_INSTANCE ]; then + echo "| Instance : $CONTAINER_INSTANCE" + fi echo "+=====================================================" } -- cgit v1.2.3