Zhang Huangbin avatar Zhang Huangbin committed c01036c

Fixed: DEBUG=NO in iRedMail.sh breaks postfix installation on FreeBSD.

Comments (0)

Files changed (5)

iRedMail/ChangeLog

+iRedMail-0.8.0-beta4:
+    * Fixed:
+        + DEBUG=NO in iRedMail.sh breaks postfix installation on FreeBSD.
+
 iRedMail-0.8.0-beta3:
     * Enable PostgreSQL support on FreeBSD, RHEL/CentOS 6.
     * Add shell scripts to backup OpenLDAP and/or MySQL in cron by default.
         + FreeBSD: 7.x
     * Enable greylist opt-in in Policyd-1.x by default.
     * It now works on Ubuntu Linux 12.04 (precise). Tested on Alpha 2.
-    * It now works on Linux Mint 12 (based on Ubuntu, code name: lisa), LMDE
-      (based on Debian).
+    * It now works on Linux Mint 12 (based on Ubuntu, code name: lisa).
     * Add share folder support within Dovecot 2.
     * Fixed:
         + Incorrect postrotate command for dovecot log files.

iRedMail/conf/core

     if [ X"$1" == X"-n" ]; then
         shift 1
         if [ X"${TERM}" == X"xterm" -o X"${TERM}" == X"linux" -o X"${TERM}" == X"pcconsole" ]; then
-            echo -ne "\033[42m${INFO_FLAG}\033[0m $@"
+            echo -ne "\033[42m${_INFO_FLAG}\033[0m $@"
         else
-            echo -ne "${INFO_FLAG} $@"
+            echo -ne "${_INFO_FLAG} $@"
         fi
     else
         if [ X"${TERM}" == X"xterm" -o X"${TERM}" == X"linux" -o X"${TERM}" == X"pcconsole" ]; then
-            echo -e "\033[42m${INFO_FLAG}\033[0m $@"
+            echo -e "\033[42m${_INFO_FLAG}\033[0m $@"
         else
-            echo -e "${INFO_FLAG} $@"
+            echo -e "${_INFO_FLAG} $@"
         fi
     fi
 }
     if [ X"$1" == X"-n" ]; then
         shift 1
         if [ X"${TERM}" == X"xterm" -o X"${TERM}" == X"linux" -o X"${TERM}" == X"pcconsole" ]; then
-            echo -ne "\033[45m${QUESTION_FLAG}\033[0m $@"
+            echo -ne "\033[45m${_QUESTION_FLAG}\033[0m $@"
         else
-            echo -ne "${QUESTION_FLAG} $@"
+            echo -ne "${_QUESTION_FLAG} $@"
         fi
     else
         if [ X"${TERM}" == X"xterm" -o X"${TERM}" == X"linux" -o X"${TERM}" == X"pcconsole" ]; then
-            echo -e "\033[45m${QUESTION_FLAG}\033[0m $@"
+            echo -e "\033[45m${_QUESTION_FLAG}\033[0m $@"
         else
-            echo -e "${QUESTION_FLAG} $@"
+            echo -e "${_QUESTION_FLAG} $@"
         fi
     fi
 }
     if [ X"$1" == X"-n" ]; then
         shift 1
         if [ X"${TERM}" == X"xterm" -o X"${TERM}" == X"linux" -o X"${TERM}" == X"pcconsole" ]; then
-            echo -ne "\033[41m${ERROR_FLAG}\033[0m $@"
+            echo -ne "\033[41m${_ERROR_FLAG}\033[0m $@"
         else
-            echo -ne "${ERROR_FLAG} $@"
+            echo -ne "${_ERROR_FLAG} $@"
         fi
     else
         if [ X"${TERM}" == X"xterm" -o X"${TERM}" == X"linux" -o X"${TERM}" == X"pcconsole" ]; then
-            echo -e "\033[41m${ERROR_FLAG}\033[0m $@"
+            echo -e "\033[41m${_ERROR_FLAG}\033[0m $@"
         else
-            echo -e "${ERROR_FLAG} $@"
+            echo -e "${_ERROR_FLAG} $@"
         fi
     fi
 }
 
 ECHO_DEBUG()
 {
-    if [ X"${DEBUG}" == X"YES" ]; then
+    if [ X"${_DEBUG}" == X"YES" ]; then
         if [ X"$1" == X"-n" ]; then
             shift 1
             if [ X"${TERM}" == X"xterm" -o X"${TERM}" == X"linux" -o X"${TERM}" == X"pcconsole" ]; then
-                echo -ne "\033[42m${DEBUG_FLAG}\033[0m $@"
+                echo -ne "\033[42m${_DEBUG_FLAG}\033[0m $@"
             else
-                echo -ne "${DEBUG_FLAG} $@"
+                echo -ne "${_DEBUG_FLAG} $@"
             fi
         else
             if [ X"${TERM}" == X"xterm" -o X"${TERM}" == X"linux" -o X"${TERM}" == X"pcconsole" ]; then
-                echo -e "\033[42m${DEBUG_FLAG}\033[0m $@"
+                echo -e "\033[42m${_DEBUG_FLAG}\033[0m $@"
             else
-                echo -e "${DEBUG_FLAG} $@"
+                echo -e "${_DEBUG_FLAG} $@"
             fi
         fi
     else
         for conf_file in $@; do
             if [ -f ${conf_file} ]; then
                 if [ X"${TERM}" == X"xterm" -o X"${TERM}" == X"linux" -o X"${TERM}" == X"pcconsole" ]; then
-                    if [ X"${DEBUG}" == X"YES" ]; then
-                        echo -e "\033[43m${BACKUP_FLAG}\033[0m ${conf_file} -> $(basename ${conf_file}).${DATE}."
+                    if [ X"${_DEBUG}" == X"YES" ]; then
+                        echo -e "\033[43m${_BACKUP_FLAG}\033[0m ${conf_file} -> $(basename ${conf_file}).${DATE}."
                     fi
                 else
-                    if [ X"${DEBUG}" == X"YES" ]; then
-                        echo -e "${BACKUP_FLAG} ${conf_file} -> $(basename ${conf_file}).${DATE}."
+                    if [ X"${_DEBUG}" == X"YES" ]; then
+                        echo -e "${_BACKUP_FLAG} ${conf_file} -> $(basename ${conf_file}).${DATE}."
                     fi
                 fi
 

iRedMail/conf/global

 export LC_ALL=C
 
 # Debug mode: YES, NO.
-if [ X"${DEBUG}" != X'YES' ]; then
-    export DEBUG='NO'
+if [ X"${_DEBUG}" != X'YES' ]; then
+    export _DEBUG='NO'
 fi
 
 # Genrate a random string.
 export STATUS_FILE="${ROOTDIR}/.status"
 
 # Output flag.
-export INFO_FLAG="< INFO >"
-export ERROR_FLAG="< ERROR >"
-export QUESTION_FLAG="< Question >"
-export BACKUP_FLAG="< Backup >"
-export DEBUG_FLAG="< DEBUG >"
+export _INFO_FLAG="< INFO >"
+export _ERROR_FLAG="< ERROR >"
+export _QUESTION_FLAG="< Question >"
+export _BACKUP_FLAG="< Backup >"
+export _DEBUG_FLAG="< DEBUG >"
 
 export CONF_MSG="#
 # File generated by ${PROG_NAME} (${DATE}):

iRedMail/functions/packages_freebsd.sh

             status="\$status_install_port_$portname"
             if [ X"$(eval echo ${status})" != X"DONE" ]; then
                 cd /usr/ports/${i} && \
-                    ECHO_INFO "Installing port: ${i} ..." && \
-                    make clean && \
-                    make install clean
+                    ECHO_INFO "Installing port: ${i} ..."
+                    echo "export status_installing_port_${portname}='processing'" >> ${STATUS_FILE}
+                    make clean && make install clean
 
                     if [ X"$?" == X"0" ]; then
                         echo "export status_install_port_${portname}='DONE'" >> ${STATUS_FILE}

iRedMail/pkgs/get_all.sh

 
 }
 
-track_iredmail_info()
+check_new_iredmail()
 {
     # Check new version and track basic information,
     # Used to help iRedMail team understand which Linux/BSD distribution
         exit 255
     fi
 
-    echo 'export status_track_iredmail_info="DONE"' >> ${STATUS_FILE}
+    echo 'export status_check_new_iredmail="DONE"' >> ${STATUS_FILE}
 }
 
 echo_end_msg()
 fi
 
 # Check latest version
-check_status_before_run track_iredmail_info
+check_status_before_run check_new_iredmail
 
 prepare_dirs
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.