#!/bin/sh
##############################################################################
# If not stated otherwise in this file or this component's LICENSE file the
# following copyright and licenses apply:
#
# Copyright 2020 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##############################################################################

. /etc/include.properties
. /etc/device.properties

if [ ! -d /dev/shm ]; then mkdir /dev/shm; fi

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

insmod lib/modules/fusion.ko
cd /mnt/nfs/env
echo "`/bin/timestamp` -------UI Manager is coming up -----"
if [ "$DEVICE_TYPE" != "mediaclient" ]; then
     if [ -f /SetEnv.sh ]; then
          . /SetEnv.sh
     fi
fi

/dump /version.txt
if [ ! -x /mnt/nfs/env/uimgr_main ]; then echo "Missing binary uimgr_main..!"; exit 0; fi
./uimgr_main
touch $RAMDISK_PATH/.uiMngrFlag


