1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

bug #1245: Fix generation of driver filenames for one_im_exec and one_vmm_exec nbased drivers.

This commit is contained in:
Ruben S. Montero 2012-09-14 23:03:42 +02:00
parent 62bf3f4bcd
commit fa444a00d7
5 changed files with 12 additions and 8 deletions

View File

@ -17,8 +17,6 @@
#--------------------------------------------------------------------------- #
#Setup driver variables
DRIVER_NAME=`basename $0 | cut -d. -f1`
if [ -z "${ONE_LOCATION}" ]; then
DRIVERRC=/etc/one/${DRIVER_NAME}/${DRIVER_NAME}rc
MADCOMMON=/usr/lib/one/mads/madcommon.sh
@ -38,7 +36,7 @@ export_rc_vars $DRIVERRC
# Go to var directory ONE_LOCATION/var or /var/lib/one
cd $VAR_LOCATION
LOG_FILE=one_im_ssh_$DRIVER_NAME
LOG_FILE=$DRIVER_NAME
# Execute the actual MAD
execute_mad $*

View File

@ -22,4 +22,6 @@ else
MAD_LOCATION=$ONE_LOCATION/lib/mads
fi
export DRIVER_NAME="one_im_sh_${BASH_ARGV##* }"
exec $MAD_LOCATION/one_im_exec -l $*

View File

@ -22,4 +22,6 @@ else
MAD_LOCATION=$ONE_LOCATION/lib/mads
fi
export DRIVER_NAME="one_im_ssh_${BASH_ARGV##* }"
exec $MAD_LOCATION/one_im_exec $*

View File

@ -14,14 +14,14 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
function mad_debug
function mad_debug
{
if [ -n "${ONE_MAD_DEBUG}" ]; then
ulimit -c 15000
fi
}
function export_rc_vars
function export_rc_vars
{
if [ -f $1 ] ; then
ONE_VARS=`cat $1 | egrep -e '^[a-zA-Z\-\_0-9]*=' | sed 's/=.*$//'`
@ -38,17 +38,17 @@ function execute_mad
{
MAD_FILE=`basename $0`
if [ -z "$LOG_FILE" ]; then
LOG_FILE=$MAD_FILE
fi
if [ -z "${ONE_LOCATION}" ]; then
MAD_EXEC_PATH=/usr/lib/one/mads/$MAD_FILE.rb
MAD_LOG_PATH=/var/log/one/$LOG_FILE.log
MAD_LOG_PATH=/var/log/one/$LOG_FILE.log
else
MAD_EXEC_PATH=$ONE_LOCATION/lib/mads/$MAD_FILE.rb
MAD_LOG_PATH=$ONE_LOCATION/var/$LOG_FILE.log
MAD_LOG_PATH=$ONE_LOCATION/var/$LOG_FILE.log
fi
if [ -n "${ONE_MAD_DEBUG}" ]; then

View File

@ -34,5 +34,7 @@ export_rc_vars $DRIVERRC
# Go to ONE_LOCATION
cd $VAR_LOCATION
LOG_FILE=one_vmm_${BASH_ARGV##* }
# Execute the actual MAD
execute_mad $*