Commits

Zhang Huangbin committed d64e870

Code cleanup.

  • Participants
  • Parent commits ee85a99

Comments (0)

Files changed (2)

iRedMail/conf/global

 # Hostname used in MySQL GRANT command.
 # Usually it's 'localhost', but not in FreeBSD Jail (use ${LOCAL_ADDRESS} or
 # hostname of Jail instead).
-if [ X"${LOCAL_ADDRESS}" == X'127.0.0.1' ]; then
-    export SQL_HOSTNAME='localhost'
-else
-    export SQL_HOSTNAME="${LOCAL_ADDRESS}"
-fi
+export SQL_HOSTNAME='localhost'
 
 # OpenLDAP
 export LDAP_SERVER_HOST="${LOCAL_ADDRESS}"

iRedMail/functions/packages_freebsd.sh

 
     for i in ${ALL_PORTS}; do
         if [ X"${i}" != X'' ]; then
-            portname="$( echo ${i} | tr -d '-' | tr -d '/' | tr -d '\.' )"
+            portname="$( echo ${i} | tr '/' '_' | tr -d '[-\.]')"
             status="\$status_fetch_port_$portname"
             if [ X"$(eval echo ${status})" != X"DONE" ]; then
                 ECHO_INFO "Fetching required distfiles for port: ${i}"
     for i in ${ALL_PORTS}; do
         if [ X"${i}" != X'' ]; then
             # Remove special characters in port name: -, /, '.'.
-            portname="$( echo ${i} | tr -d '[-/\.]')"
+            portname="$( echo ${i} | tr '/' '_' | tr -d '[-\.]')"
 
             status="\$status_install_port_$portname"
             if [ X"$(eval echo ${status})" != X"DONE" ]; then