improved foglamp start in cas of Centos/RH
@@ -42,14 +42,19 @@ PLATFORM=`get_platform`
# RedHat specific
if [[ "$PLATFORM" != "" ]]
then
- # platform Redhat/Centos
-
- export PATH=/opt/rh/rh-python36/root/usr/bin${PATH:+:${PATH}}
- export LD_LIBRARY_PATH=/opt/rh/rh-python36/root/usr/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
- export MANPATH=/opt/rh/rh-python36/root/usr/share/man:$MANPATH
- export PKG_CONFIG_PATH=/opt/rh/rh-python36/root/usr/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}
- export XDG_DATA_DIRS="/opt/rh/rh-python36/root/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
+ # To avoid to stop the execution for any internal error of scl_source
+ set +e
+ source scl_source enable rh-python36
+ status=$?
+ if [[ "$status" != "0" ]]
+ then
+ msg_text="ERROR: FogLAMP cannot enable the python environment in RedHat/Centos platform."
+ logger -p local0.err -t msg_text
+ echo msg_text
+ exit 1
+ fi
+ set -e
else
# platform Debian/Ubuntu
:
