git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
separate postgresql launching and checking
[plcapi.git]
/
plc.d
/
db
diff --git
a/plc.d/db
b/plc.d/db
index
644a3ad
..
3b84b59
100755
(executable)
--- a/
plc.d/db
+++ b/
plc.d/db
@@
-1,6
+1,4
@@
#!/bin/bash
#!/bin/bash
-# $Id$
-# $URL$
#
# priority: 900
#
#
# priority: 900
#
@@
-30,7
+28,7
@@
function extend_db()
extension=${script##*.}
version=$(psql -U $PLC_DB_USER --quiet --tuples-only --no-align -c \
"SELECT version FROM plc_db_extensions WHERE name='$name' LIMIT 1" \
extension=${script##*.}
version=$(psql -U $PLC_DB_USER --quiet --tuples-only --no-align -c \
"SELECT version FROM plc_db_extensions WHERE name='$name' LIMIT 1" \
- $PLC_DB_NAME 2>/dev/null | awk '/^[0-9]+$/ { ver=$1 } END { print ver }')
+ $PLC_DB_NAME 2>/dev/null | awk '
BEGIN { ver=0 }
/^[0-9]+$/ { ver=$1 } END { print ver }')
if [ $version -eq 0 ]; then
if [ "$extension" = "sql" ] ; then
dialog " - $script (dbdumped)"
if [ $version -eq 0 ]; then
if [ "$extension" = "sql" ] ; then
dialog " - $script (dbdumped)"