[Ultrapossum-cvs 440] ultrapossum/debian 1.7, 1.8, ultrapossum-common.config

Back to archive index

Masato Taruishi taru****@users*****
2004年 9月 17日 (金) 00:56:29 JST


===================================================================
RCS file: ultrapossum/debian/ultrapossum-common.config,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ultrapossum/debian/ultrapossum-common.config	2004/09/16 13:46:44	1.7
+++ ultrapossum/debian/ultrapossum-common.config	2004/09/16 15:56:29	1.8
@@ -33,33 +33,40 @@
   if test -f "/etc/ultrapossum/ultrapossum.cf"; then
     . /etc/ultrapossum/ultrapossum.cf
   fi
-  db_fget ultrapossum-common/organization seen
-  if test "x$RET" = "xfalse"; then
-    db_set ultrapossum-common/organization "$ORGANIZATION"
-  fi
 fi
 
 # In reconfiguration time, debconf must use system configuration value
-if test "$1" = "reconfigure"; then
-  db_set ultrapossum-common/suffix "$SUFFIX"
-  db_set ultrapossum-common/organization "$ORGANIZATION"
-  db_set ultrapossum-common/config_backend_ldap_uri "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_URI"
-  db_set ultrapossum-common/config_backend_ldap_basedn "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BASEDN"
-  db_set ultrapossum-common/config_backend_ldap_binddn "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDDN"
-  db_set ultrapossum-common/config_backend_ldap_bindpw "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDPW"
-  db_set ultrapossum-common/config_backend_ldap_bindpw2 "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDPW"
+if test "x$1" = "xreconfigure"; then
+  set() {
+    db_set "$1" "$2"
+  }
+else
+  set() {
+    db_fget "$1" seen
+    if test "x$RET" = "xfalse"; then
+      db_set "$1" "$2"
+    fi
+  }
+fi
 
-  case "$ULTRAPOSSUM_CONFIG_BACKEND" in
-    ldap)
-      backend=ldap
-    ;;
-    *)
-      backend=file
-    ;;    
-  esac
+set ultrapossum-common/suffix "$SUFFIX"
+set ultrapossum-common/organization "$ORGANIZATION"
+set ultrapossum-common/config_backend_ldap_uri "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_URI"
+set ultrapossum-common/config_backend_ldap_basedn "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BASEDN"
+set ultrapossum-common/config_backend_ldap_binddn "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDDN"
+set ultrapossum-common/config_backend_ldap_bindpw "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDPW"
+set ultrapossum-common/config_backend_ldap_bindpw2 "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDPW"
 
-  db_set ultrapossum-common/config_backend "$backend"
-fi
+case "$ULTRAPOSSUM_CONFIG_BACKEND" in
+  ldap)
+    backend=ldap
+  ;;
+  *)
+    backend=file
+  ;;    
+esac
+
+set ultrapossum-common/config_backend "$backend"
 
 STATE=start
 while test "$STATE" != "end"; do
@@ -79,7 +86,7 @@
           STATE=ldapstart
         ;;
         *)
-          db_input low ultrapossum-common/organization || true
+          db_input medium ultrapossum-common/organization || true
           db_input low ultrapossum-common/suffix || true
 	  if ! db_go; then
 	    STATE=backend



Ultrapossum-cvs メーリングリストの案内
Back to archive index