[Ultrapossum-cvs 237] ultrapossum/module/server ...

アーカイブの一覧に戻る

Masato Taruishi taru****@sourc*****
2004年 6月 24日 (木) 19:12:54 JST


===================================================================
RCS file: ultrapossum/module/server/10server,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ultrapossum/module/server/10server	2004/06/24 09:31:42	1.2
+++ ultrapossum/module/server/10server	2004/06/24 10:12:54	1.3
@@ -87,23 +87,23 @@
 LDAPURILIST=`ultrapossum_getconf LDAPURILIST ldap://:$LDAPLISTENPORT/`
 
 MASTER=`ultrapossum_getconf MASTER $LDAPMASTER`
+SLAPD_VERSION=`strings $SLAPD | grep OpenLDAP: | sed -e 's/.*slapd \([^ ]*\).*$/\1/'`
 
-if test "x$SLAPD_VERSION" = "x" && test -x $ldaplibexecdir/slapd; then
-  slapd_version=`strings $ldaplibexecdir/slapd | grep OpenLDAP: | sed -e 's/.*slapd \([^ ]*\).*$/\1/'`
-  case "$slapd_version" in
+if test "x$SLAPD_MAJOR_VERSION" = "x" && test -x $SLAPD; then
+  case "$SLAPD_VERSION" in
     2.0.*)
-      SLAPD_VERSION=2.0
+      SLAPD_MAJOR_VERSION=2.0
       ;;
     2.1.*|2.2.*)
-      SLAPD_VERSION=2.1
+      SLAPD_MAJOR_VERSION=2.1
       ;;
     2.X) # CVS
-      SLAPD_VERSION=2.1
+      SLAPD_MAJOR_VERSION=2.1
       ;;
   esac
 fi
 
-if test "x$SLAPD_VERSION" = "x" && test -x /usr/bin/dpkg; then
+if test "x$SLAPD_MAJOR_VERSION" = "x" && test -x /usr/bin/dpkg; then
   if test "x$SLAPD_DEB_VERSION" = "x"; then
     if test -x "/usr/bin/dlocate"; then
       if test "/var/lib/dpkg/status" -nt "/var/lib/dlocate/dlocatedb"; then
@@ -123,17 +123,17 @@
 
   case "$SLAPD_DEB_VERSION" in
     2.0.*)
-      SLAPD_VERSION=2.0
+      SLAPD_MAJOR_VERSION=2.0
     ;;
     2.1.*)
-      SLAPD_VERSION=2.1
+      SLAPD_MAJOR_VERSION=2.1
       ;;
     *sb*)
-      SLAPD_VERSION=2.1
+      SLAPD_MAJOR_VERSION=2.1
       SLAPD_PROVIDES_SYNCBACKUP=YES
       ;;
     2.2.*)
-      SLAPD_VERSION=2.1
+      SLAPD_MAJOR_VERSION=2.1
       ;;
     *)
       echo "Warning: Unknown debian package version $SLAPD_DEB_VERSION" 1>&2
@@ -143,16 +143,16 @@
 
 fi
 
-if test "x$SLAPD_VERSION" = "x" && test -x "/bin/rpm"; then
+if test "x$SLAPD_MAJOR_VERSION" = "x" && test -x "/bin/rpm"; then
   SLAPD_RPM_VERSION=`rpm -q --queryformat='%{Version}' $SLAPD_RPM_PACKAGE`
   case "$SLAPD_RPM_VERSION" in
     2.0.*)
-      SLAPD_VERSION=2.0
+      SLAPD_MAJOR_VERSION=2.0
     ;;
   esac 
 fi
 
-SLAPD_VERSION=`ultrapossum_getconf SLAPD_VERSION 2.0`
+SLAPD_MAJOR_VERSION=`ultrapossum_getconf SLAPD_MAJOR_VERSION 2.0`
 SLAPD_BERKLEYDB_SONAME=$(ultrapossum_getconf SLAPD_BERKLEYDB_SONAME `ldd $SLAPD | grep libdb | awk -F' ' '{print $1;}'`)
 
 SLURPDSLAVES=`ultrapossum_getconf SLURPDSLAVES ""`
@@ -166,7 +166,7 @@
 
 eval "`ultrapossum_parse_config server`"
 
-case "$SLAPD_VERSION" in
+case "$SLAPD_MAJOR_VERSION" in
   2.0)
     SLAPD_DEFAULT_BACKEND_DB_TYPE=ldbm
   ;;
@@ -175,7 +175,7 @@
   ;;
 esac
 
-case "$SLAPD_VERSION" in
+case "$SLAPD_MAJOR_VERSION" in
         2.0)
                 . $MODULEDIR/server/2.0
         ;;
@@ -183,7 +183,7 @@
                 . $MODULEDIR/server/2.1
         ;;
         *)
-                echo "Unknown slapd version type $SLAPD_VERSION" 1>&2
+                echo "Unknown slapd version type $SLAPD_MAJOR_VERSION" 1>&2
         ;;
 esac
 
===================================================================
RCS file: ultrapossum/module/server/backup.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ultrapossum/module/server/backup.sh	2004/06/24 07:25:28	1.9
+++ ultrapossum/module/server/backup.sh	2004/06/24 10:12:54	1.10
@@ -24,8 +24,8 @@
 eval `ultrapossum-config init`
 trap "eval `ultrapossum-config term`" 0
 
-if test "x$SLAPD_VERSION" = "2.0"; then
-  echo "E: can't backup when slapd $SLAPD_VERSION is running" 1>&2
+if test "x$SLAPD_MAJOR_VERSION" = "2.0"; then
+  echo "E: can't backup when slapd $SLAPD_MAJOR_VERSION is running" 1>&2
   exit 1
 fi
 
===================================================================
RCS file: ultrapossum/module/server/server.cf,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ultrapossum/module/server/server.cf	2004/06/16 10:38:16	1.10
+++ ultrapossum/module/server/server.cf	2004/06/24 10:12:54	1.11
@@ -8,7 +8,7 @@
 ###
 
 # Server version to use
-#SLAPD_VERSION="2.0"
+#SLAPD_MAJOR_VERSION="2.0"
 
 ###
 ### Chroot 'jail' directory Configuration



Ultrapossum-cvs メーリングリストの案内
アーカイブの一覧に戻る