[sr-dev] git:master: utils/kamctl: lookup new versions of dbutils tools in kamdbctl. db_berkeley

Daniel-Constantin Mierla miconda at gmail.com
Sun Oct 5 22:51:23 CEST 2014


Module: sip-router
Branch: master
Commit: 9d646005e52efc1a5d5e4e0390228a7d4021f5c3
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9d646005e52efc1a5d5e4e0390228a7d4021f5c3

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Sun Oct  5 10:03:43 2014 +0200

utils/kamctl: lookup new versions of dbutils tools in kamdbctl.db_berkeley

---

 utils/kamctl/kamdbctl.db_berkeley |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/utils/kamctl/kamdbctl.db_berkeley b/utils/kamctl/kamdbctl.db_berkeley
index 2226a47..e11e783 100644
--- a/utils/kamctl/kamdbctl.db_berkeley
+++ b/utils/kamctl/kamdbctl.db_berkeley
@@ -1,6 +1,4 @@
 #
-# $Id$
-#
 # Script for maintaining Kamailio Berkeley DB tables
 # Copyright (C) 2007 Cisco Systems
 #
@@ -59,6 +57,19 @@ if [ $ret -eq 0 ] ; then
 fi ;
 
 
+which db5.0_dump > /dev/null
+ret=$?
+if [ $ret -eq 0 ] ; then
+	DUMP_CMD="db5.0_dump"
+fi ;
+
+which db5.1_dump > /dev/null
+ret=$?
+if [ $ret -eq 0 ] ; then
+	DUMP_CMD="db5.1_dump"
+fi ;
+
+
 #berkeley db utility program that imports data from plain text file
 #small hack to autodetect the db load command, debian prefix the version..
 
@@ -86,6 +97,19 @@ if [ $ret -eq 0 ] ; then
 	LOAD_CMD="db4.6_load"
 fi ;
 
+
+which db5.0_load > /dev/null
+ret=$?
+if [ $ret -eq 0 ] ; then
+	LOAD_CMD="db5.0_load"
+fi ;
+
+which db5.1_load > /dev/null
+ret=$?
+if [ $ret -eq 0 ] ; then
+	LOAD_CMD="db5.1_load"
+fi ;
+
 # path to the database schemas
 DATA_DIR="/usr/local/share/kamailio"
 if [ -d "$DATA_DIR/db_berkeley/kamailio" ] ; then




More information about the sr-dev mailing list