Răsfoiți Sursa

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

Daniel-Constantin Mierla 11 ani în urmă
părinte
comite
9d646005e5
1 a modificat fișierele cu 26 adăugiri și 2 ștergeri
  1. 26 2
      utils/kamctl/kamdbctl.db_berkeley

+ 26 - 2
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