Commits

Zhang Huangbin committed 030d293

Add Ubuntu 12.04 (precise) support.

  • Participants
  • Parent commits f1e3474

Comments (0)

Files changed (8)

iRedMail/conf/global

         #   - 10.10: maverick
         #   - 11.04: natty
         #   - 11.10: oneiric
+        #   - 12.04: precise
         export DISTRO_ID="$(grep 'DISTRIB_ID' /etc/lsb-release | awk -F'=' '{print $2}')"
         export DISTRO_VERSION="$(grep 'DISTRIB_RELEASE' /etc/lsb-release | awk -F'=' '{print $2}')"
         export DISTRO_CODENAME="$(grep 'DISTRIB_CODENAME' /etc/lsb-release | awk -F'=' '{print $2}')"

iRedMail/conf/managesieve

     export MANAGESIEVE_PORT='4190'
 fi
 
-# Debian 6 (squeeze), Ubuntu 11.10 (oneiric).
+# Debian 6 (squeeze), Ubuntu 11.10 (oneiric), 12.04 (precise).
 if [ X"${DISTRO_CODENAME}" == X"squeeze" \
     -o X"${DISTRO_CODENAME}" == X"oneiric" \
+    -o X"${DISTRO_CODENAME}" == X"precise" \
     ]; then
     export MANAGESIEVE_PORT='4190'
 fi

iRedMail/conf/policy_server

 # along with iRedMail.  If not, see <http://www.gnu.org/licenses/>.
 #---------------------------------------------------------------------
 
-if [ X"${DISTRO_CODENAME}" == X"oneiric" ]; then
+if [ X"${DISTRO_CODENAME}" == X"oneiric" \
+    -o X"${DISTRO_CODENAME}" == X"precise" \
+    ]; then
     # Use Policyd-2.x (cluebringer).
     export USE_CLUEBRINGER='YES'
     export USE_POLICYD='NO'

iRedMail/dialog/config_via_dialog.sh

 # --------------------------------------------------
 # PGSQL is available on Ubuntu 11.04, 11.10.
 if [ X"${DISTRO_CODENAME}" == X"oneiric" \
-    -o X"${DISTRO_CODENAME}" == X"natty" \
+    -o X"${DISTRO_CODENAME}" == X"precise" \
     ]; then
     ${DIALOG} \
     --title "Choose your preferred backend used to store mail accounts" \

iRedMail/functions/cluebringer.sh

     ECHO_DEBUG "Add user and group for policyd: ${CLUEBRINGER_USER}:${CLUEBRINGER_GROUP}."
 
     if [ X"${DISTRO}" == X"UBUNTU" ]; then
-        if [ X"${DISTRO_CODENAME}" == X"oneiric" ]; then
+        if [ X"${DISTRO_CODENAME}" == X"oneiric" \
+            -o X"${DISTRO_CODENAME}" == X"precise" \
+            ]; then
             # User/group will be created during installing binary package.
             :
         fi

iRedMail/functions/iredadmin.sh

 
 
     # Ubuntu 11.10 uses Policyd-2 which is not yet supported in iRedAdmin.
-    if [ X"${DISTRO_CODENAME}" == X"oneiric" ]; then
+    if [ X"${DISTRO_CODENAME}" == X"oneiric" \
+        -o X"${DISTRO_CODENAME}" == X"precise" \
+        ]; then
         sed -i.tmp -e "/\[policyd\]/,/\[/ s#\(^enabled =\).*#\1 False#" settings.ini
     fi
 

iRedMail/functions/packages.sh

         # Authentication modules
         ALL_PKGS="${ALL_PKGS} libapache2-mod-auth-mysql libapache2-mod-auth-pgsql"
 
-        if [ X"${DISTRO_CODENAME}" != X"oneiric" ]; then
+        if [ X"${DISTRO_CODENAME}" != X"oneiric" \
+            -a X"${DISTRO_CODENAME}" != X"precise" \
+            ]; then
             ALL_PKGS="${ALL_PKGS} php5-mhash"
         fi
 
         if [ X"${DISTRO_CODENAME}" == X"lucid" \
             -o X"${DISTRO_CODENAME}" == X"natty" \
             -o X"${DISTRO_CODENAME}" == X"oneiric" \
+            -o X"${DISTRO_CODENAME}" == X"precise" \
             ]; then
             if [ X"${BACKEND}" == X"OPENLDAP" ]; then
                 ALL_PKGS="${ALL_PKGS} php-net-ldap2"
         ALL_PKGS="${ALL_PKGS} policyd"
         ENABLED_SERVICES="${ENABLED_SERVICES} policyd"
     elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
-        if [ X"${DISTRO_CODENAME}" == X"oneiric" ]; then
+        if [ X"${DISTRO_CODENAME}" == X"oneiric" \
+            -o X"${DISTRO_CODENAME}" == X"precise" \
+            ]; then
             # Policyd-2.x, code name "cluebringer".
             ALL_PKGS="${ALL_PKGS} postfix-cluebringer postfix-cluebringer-webui"
             ENABLED_SERVICES="${ENABLED_SERVICES} postfix-cluebringer"
     elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
         ALL_PKGS="${ALL_PKGS} dovecot-imapd dovecot-pop3d"
 
-        if [ X"${DISTRO_CODENAME}" == X"oneiric" ]; then
+        if [ X"${DISTRO_CODENAME}" == X"oneiric" \
+            -o X"${DISTRO_CODENAME}" == X"precise" \
+            ]; then
             ALL_PKGS="${ALL_PKGS} dovecot-managesieved dovecot-sieve"
 
             if [ X"${BACKEND}" == X"OPENLDAP" ]; then

iRedMail/functions/policy_server.sh

 
 policy_server_config()
 {
-    if [ X"${DISTRO_CODENAME}" != X"oneiric" ]; then
+    if [ X"${DISTRO_CODENAME}" != X"oneiric" \
+        -a X"${DISTRO_CODENAME}" != X"precise" \
+        ]; then
         . ${FUNCTIONS_DIR}/policyd.sh
 
         ECHO_INFO "Configure Policyd (postfix policy server, version 1.8)."