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

Change subject: db: do not write to dbscripts after installation
......................................................................

db: do not write to dbscripts after installation

Writing to /usr is not allowed not via package manager.

Change-Id: Ic7e9f477c94047176ab5c4406cea1275af68376d
Signed-off-by: Alon Bar-Lev <[email protected]>
---
M backend/manager/dbscripts/dbfunctions.sh
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/89/12989/1

diff --git a/backend/manager/dbscripts/dbfunctions.sh 
b/backend/manager/dbscripts/dbfunctions.sh
index d4b4460..8be190d 100755
--- a/backend/manager/dbscripts/dbfunctions.sh
+++ b/backend/manager/dbscripts/dbfunctions.sh
@@ -82,10 +82,13 @@
 drop_sps() {
 # common stored procedures are executed first (for new added functions to be 
valid)
 execute_file "common_sp.sql" ${DATABASE} ${SERVERNAME} ${PORT} > /dev/null
+    local drop_all_functions=$(mktemp)
+
     CMD="select * from generate_drop_all_functions_syntax();"
-    execute_command "$CMD"  ${DATABASE} ${SERVERNAME} ${PORT} > 
drop_all_functions.sql
-    execute_file "drop_all_functions.sql" ${DATABASE} ${SERVERNAME} ${PORT} > 
/dev/null
-    \rm -f drop_all_functions.sql
+    execute_command "$CMD"  ${DATABASE} ${SERVERNAME} ${PORT} > 
"${drop_all_functions}"
+    execute_file "${drop_all_functions}" ${DATABASE} ${SERVERNAME} ${PORT} > 
/dev/null
+    \rm -f "${drop_all_functions}"
+
     #drop old uuid functions
     psql -U postgres -h ${SERVERNAME} -p ${PORT} -f 
drop_old_uuid_functions.sql ${DATABASE} > /dev/null
     # recreate generic functions


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7e9f477c94047176ab5c4406cea1275af68376d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
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