mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-01 05:47:01 +03:00
port configuration reader for scheduler now more compatible
This commit is contained in:
parent
3f310220e2
commit
1cb6f97ebd
@ -22,6 +22,7 @@ if [ -z "$ONE_LOCATION" ]; then
|
|||||||
ONE_CONF=/etc/one/oned.conf
|
ONE_CONF=/etc/one/oned.conf
|
||||||
ONE_DB=/var/lib/one/one.db
|
ONE_DB=/var/lib/one/one.db
|
||||||
ONE_LOG=/var/log/one/oned.log
|
ONE_LOG=/var/log/one/oned.log
|
||||||
|
ONE_CONFIG=/var/lib/one/config
|
||||||
|
|
||||||
ONED=/usr/bin/oned
|
ONED=/usr/bin/oned
|
||||||
ONE_SCHEDULER=/usr/bin/mm_sched
|
ONE_SCHEDULER=/usr/bin/mm_sched
|
||||||
@ -33,6 +34,7 @@ else
|
|||||||
ONE_CONF=$ONE_LOCATION/etc/oned.conf
|
ONE_CONF=$ONE_LOCATION/etc/oned.conf
|
||||||
ONE_DB=$ONE_LOCATION/var/one.db
|
ONE_DB=$ONE_LOCATION/var/one.db
|
||||||
ONE_LOG=$ONE_LOCATION/var/oned.log
|
ONE_LOG=$ONE_LOCATION/var/oned.log
|
||||||
|
ONE_CONFIG=$ONE_LOCATION/var/config
|
||||||
|
|
||||||
ONED=$ONE_LOCATION/bin/oned
|
ONED=$ONE_LOCATION/bin/oned
|
||||||
ONE_SCHEDULER=$ONE_LOCATION/bin/mm_sched
|
ONE_SCHEDULER=$ONE_LOCATION/bin/mm_sched
|
||||||
@ -45,11 +47,10 @@ fi
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
setup()
|
setup()
|
||||||
{
|
{
|
||||||
PORT=$(sed -n '/^[ \t]*PORT/s/^.*PORT\s*=\s*\([0-9]\+\)\s*.*$/\1/p' \
|
PORT=$(grep '^PORT=' $ONE_CONFIG | sed 's/PORT=//')
|
||||||
$ONE_CONF)
|
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Can not find PORT in $ONE_CONF."
|
echo "Can not find PORT in $ONE_CONFIG."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user