Commits

Zhang Huangbin committed fd3de10

Code cleanup.

Comments (0)

Files changed (4)

iRedMail/conf/core

             portname="$( echo ${i} | tr -d '-' | tr -d '/' | tr -d '\.' )"
             status="\$status_install_port_$portname"
             if [ X"$(eval echo ${status})" != X"DONE" ]; then
-                ECHO_INFO "Installing package: ${i} ..."
-                emerge --buildpkg ${i}
+                emerge ${GENTOO_EMERGE_INSTALL_OPTIONS} ${i}
 
                 if [ X"$?" == X"0" ]; then
                     echo "export status_install_port_${portname}='DONE'" >> ${STATUS_FILE}

iRedMail/conf/global

     export PKG_DIALOG="dialog"
     export PKG_BZIP2="bzip2"
 
+    # Options used for install package
+    export GENTOO_EMERGE_INSTALL_OPTIONS='--buildpkg'
+
 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
     # System user: root.
     export SYS_ROOT_USER='root'

iRedMail/functions/packages.sh

         elif [ X"${DISTRO}" == X"GENTOO" ]; then
             ALL_PKGS="${ALL_PKGS} openldap"
             ENABLED_SERVICES="${ENABLED_SERVICES} slapd"
-            gentoo_add_use_flags 'net-nds/openldap' 'berkdb crypt ipv6 ssl tcpd overlays perl sasl syslog'
+            gentoo_add_use_flags 'net-nds/openldap' 'crypt ipv6 ssl tcpd overlays perl sasl syslog'
 
             # MySQL server and client.
             ALL_PKGS="${ALL_PKGS} mysql"

iRedMail/pkgs/get_all.sh

     cd ${PKG_DIR}
 
     if [ X"${PKGLIST}" != X"0" ]; then
-        ECHO_INFO "Fetching Binary Packages ..."
+        ECHO_INFO "Fetching binary packages ..."
         for i in ${PKGLIST}; do
             if [ X"${DISTRO}" == X"DEBIAN" ]; then
                 url="${MIRROR}/debian/lenny/${i}"
     misc_total=$(( $(echo ${MISCLIST} | wc -w | awk '{print $1}') ))
     misc_count=1
 
-    ECHO_INFO "Fetching Source Tarballs ..."
+    ECHO_INFO "Fetching source tarballs ..."
 
     for i in ${MISCLIST}; do
         url="${MIRROR}/misc/${i}"
     cd ${ROOTDIR}
 
     if [ X"${DISTRO}" != X"FREEBSD" ]; then
-        ECHO_INFO -n "Validate Packages ..."
+        ECHO_INFO -n "Validate packages ..."
 
         md5file="/tmp/check_md5_tmp.${RANDOM}$RANDOM}"
         echo -e "${MD5LIST}" > ${md5file}
 
         if [ X"${RETVAL}" == X"0" ]; then
             echo -e "\t[ FAILED ]"
-            ECHO_ERROR "MD5 check failed. Check your rpm packages. Script exit ...\n"
+            ECHO_ERROR "MD5 check failed. Script exit ...\n"
             exit 255
         else
             echo -e "\t[ OK ]"