#!/bin/bash

OVERLAY_PATH="/mnt/ubi_boot/jb_overlay"
LOG_FILE=/tmp/jb_init.log

log () {
	echo "$1" >>${LOG_FILE} 2>&1
}

launch_bdp () {
	log "launching original player prog"
	/usr/local/bin/bdpprog.1
	exit
}

if [ ! -x ${OVERLAY_PATH}/etc/init.sh ];then
	log "init.sh not found or not executable" 
	launch_bdp
	exit
fi


log "launching init.sh" 
"${OVERLAY_PATH}/etc/init.sh"

