Masato Taruishi
taru****@users*****
2004年 9月 21日 (火) 13:58:38 JST
=================================================================== RCS file: ultrapossum/debian/ultrapossum-common.postinst,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ultrapossum/debian/ultrapossum-common.postinst 2004/09/21 04:42:52 1.10 +++ ultrapossum/debian/ultrapossum-common.postinst 2004/09/21 04:58:38 1.11 @@ -49,6 +49,31 @@ fi } +set_config_backend() { + ( + eval `ultrapossum-config init` + db_get ultrapossum-common/config_backend + backend="$RET" + case "$backend" in + ldap) + setconfig_backend config_backend ULTRAPOSSUM_CONFIG_BACKEND + setconfig_backend config_backend_ldap_uri ULTRAPOSSUM_CONFIG_BACKEND_LDAP_URI + setconfig_backend config_backend_ldap_basedn ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BASEDN + setconfig_backend config_backend_ldap_binddn ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDDN + setconfig_backend config_backend_ldap_bindpw ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDPW + ;; + *) + 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 "$1" in configure) @@ -58,27 +83,9 @@ ucf /usr/share/ultrapossum/ucf/ultrapossum/$f \ /etc/ultrapossum/$f done - - eval `ultrapossum-config init` - db_get ultrapossum-common/config_backend - backend="$RET" - case "$backend" in - ldap) - setconfig_backend config_backend ULTRAPOSSUM_CONFIG_BACKEND - setconfig_backend config_backend_ldap_uri ULTRAPOSSUM_CONFIG_BACKEND_LDAP_URI - setconfig_backend config_backend_ldap_basedn ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BASEDN - setconfig_backend config_backend_ldap_binddn ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDDN - setconfig_backend config_backend_ldap_bindpw ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDPW - ;; - *) - 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` + set_config_backend + case "$backend" in ldap) ;;