[Ultrapossum-cvs 485] ultrapossum/debian 1.9, 1.10, ultrapossum-common.postinst

Back to archive index

Masato Taruishi taru****@users*****
2004年 9月 21日 (火) 13:42:52 JST


===================================================================
RCS file: ultrapossum/debian/ultrapossum-common.postinst,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ultrapossum/debian/ultrapossum-common.postinst	2004/09/20 03:01:36	1.9
+++ ultrapossum/debian/ultrapossum-common.postinst	2004/09/21 04:42:52	1.10
@@ -51,43 +51,18 @@
 
 case "$1" in
     configure)
-	ultrapossum-config remove . SUFFIX
-	ultrapossum-config remove . ORGANIZATION
 
-        db_get ultrapossum-common/config_backend
-	case "$RET" in
-	  ldap)
-	    :
-	  ;;
-	  *)
-	    install -d /etc/ultrapossum/
-	    ucf /usr/share/ultrapossum/ucf/ultrapossum/ultrapossum.cf \
-			/etc/ultrapossum/ultrapossum.cf
-	  ;;
-	esac
 	for f in config.cf debian.cf secret.cf
 	do
 	        install -d `dirname /etc/ultrapossum/$f`
 		ucf /usr/share/ultrapossum/ucf/ultrapossum/$f \
 			/etc/ultrapossum/$f
 	done
-
+	
 	eval `ultrapossum-config init`
-	trap "eval `ultrapossum-config term`" 0
-
-	setconfig suffix SUFFIX
-	setconfig organization ORGANIZATION
-
-	db_get ultrapossum-common/rootpw
-	if test "x$RET" = "x"; then
-	  echo -n "Creating password for admin... " 1>&2
-	  db_set ultrapossum-common/rootpw "`makepasswd`"
-	  echo "done" 1>&2
-  	fi
-        setsecretconfig rootpw ROOTPW
-
         db_get ultrapossum-common/config_backend
-        case "$RET" in
+	backend="$RET"
+        case "$backend" in
           ldap)
 	    setconfig_backend config_backend ULTRAPOSSUM_CONFIG_BACKEND
 	    setconfig_backend config_backend_ldap_uri ULTRAPOSSUM_CONFIG_BACKEND_LDAP_URI
@@ -97,7 +72,34 @@
           ;;
           *)
             ultrapossum_setconf_shell /etc/ultrapossum/config.cf ULTRAPOSSUM_CONFIG_BACKEND ""
+	    install -d /etc/ultrapossum/
+	    ucf /usr/share/ultrapossum/ucf/ultrapossum/ultrapossum.cf \
+			/etc/ultrapossum/ultrapossum.cf
           ;;
+        esac
+	eval `ultrapossum-config term`
+
+        case "$backend" in
+	  ldap)
+	  ;;
+	  *)
+	    ultrapossum-config remove . SUFFIX
+	    ultrapossum-config remove . ORGANIZATION
+
+	    eval `ultrapossum-config init`
+	    trap "eval `ultrapossum-config term`" 0
+
+	    setconfig suffix SUFFIX
+	    setconfig organization ORGANIZATION
+
+	    db_get ultrapossum-common/rootpw
+	    if test "x$RET" = "x"; then
+	      echo -n "Creating password for admin... " 1>&2
+	      db_set ultrapossum-common/rootpw "`makepasswd`"
+	      echo "done" 1>&2
+            fi
+            setsecretconfig rootpw ROOTPW
+	  ;;
         esac
 	chmod 1777 /var/cache/ultrapossum/
     ;;



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