Eli Mesika has uploaded a new change for review.

Change subject: core:  When there is no post upgrade files the ...
......................................................................

core:  When there is no post upgrade files the ...

When there is no post upgrade files the creation of the database
repeats forever.

Adding a check if directory exists before getting pre/post upgrade
scripts.

Change-Id: I476b533b6df9814cfe8970dac0d3e71bc0d90017
Signed-off-by: Eli Mesika <[email protected]>
Bug-Url:https://bugzilla.redhat.com/886131
---
M backend/manager/dbscripts/dbfunctions.sh
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/98/10598/1

diff --git a/backend/manager/dbscripts/dbfunctions.sh 
b/backend/manager/dbscripts/dbfunctions.sh
index ffffda0..668d379 100755
--- a/backend/manager/dbscripts/dbfunctions.sh
+++ b/backend/manager/dbscripts/dbfunctions.sh
@@ -134,10 +134,12 @@
 # The second argument is the label to use while notifying
 # the user about the running of the script
 execute_commands_in_dir() {
-    files=$(get_files "upgrade/${1}" 1)
-    for execFile in $(ls $files | sort); do
-       run_file $execFile
-    done
+    if [ -d upgrade/$1 ]; then
+        files=$(get_files "upgrade/${1}" 1)
+        for execFile in $(ls $files | sort); do
+           run_file $execFile
+        done
+    fi
 }
 
 run_required_scripts() {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I476b533b6df9814cfe8970dac0d3e71bc0d90017
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to