Alon Bar-Lev has uploaded a new change for review.

Change subject: core: better detection of otopi executable
......................................................................

core: better detection of otopi executable

1. Allow override of sources location.

2. Look for otopi at same location as script.

Change-Id: Ife228161053fda9d8dcc3aa1fbcfcf0a1c053e19
Signed-off-by: Alon Bar-Lev <[email protected]>
---
M src/bin/ovirt-host-deploy.in
1 file changed, 9 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-host-deploy 
refs/changes/03/11403/1

diff --git a/src/bin/ovirt-host-deploy.in b/src/bin/ovirt-host-deploy.in
index aa0d152..e22634a 100644
--- a/src/bin/ovirt-host-deploy.in
+++ b/src/bin/ovirt-host-deploy.in
@@ -21,13 +21,17 @@
 scriptdir="$(dirname "$0")"
 otopidir="${scriptdir}"
 extraenv=""
-if [ -f "${scriptdir}/.source" ]; then
-       OTOPI_SOURCES="@OTOPI_SOURCES@"
-       if [ -z "${OTOPI_SOURCES}" ]; then
-               otopidir="/usr/sbin"
+OTOPI_SOURCES="${OTOPI_SOURCES:-@OTOPI_SOURCES@}"
+if [ -z "${OTOPI_SOURCES}" ]; then
+       if [ -x "${scriptdir}/otopi" ]; then
+               otopidir="${scriptdir}"
        else
-               otopidir="${OTOPI_SOURCES}/src/bin"
+               otopidir="/usr/sbin"
        fi
+else
+       otopidir="${OTOPI_SOURCES}/src/bin"
+fi
+if [ -f "${scriptdir}/.source" ]; then
        export PYTHONPATH="$(cd "${scriptdir}" && pwd)/..:${PYTHONPATH}"
        extraenv="APPEND:BASE/pluginPath=str:${scriptdir}/../plugins"
 fi


--
To view, visit http://gerrit.ovirt.org/11403
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife228161053fda9d8dcc3aa1fbcfcf0a1c053e19
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-host-deploy
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to