Commits

Zhang Huangbin  committed 44c6349

Code cleanup.

  • Participants
  • Parent commits 817e48f

Comments (0)

Files changed (3)

File iRedMail/conf/global

     export PKG_BZIP2="bzip2"
 
     # Options used for install package
-    export GENTOO_EMERGE_INSTALL_OPTIONS='--buildpkg --quiet-build'
+    export GENTOO_EMERGE_INSTALL_OPTIONS='--usepkg --binpkg-respect-use --buildpkg --quiet-build'
     export GENTOO_CONF_PACKAGE_USE='/etc/portage/package.use'
     export GENTOO_CONF_PACKAGE_MASK='/etc/portage/package.mask'
     export GENTOO_CONF_PACKAGE_UNMASK='/etc/portage/package.unmask'

File iRedMail/functions/clamav.sh

     export CLAMD_LOCAL_SOCKET CLAMD_LISTEN_ADDR
     ECHO_DEBUG "Configure ClamAV: ${CLAMD_CONF}."
     perl -pi -e 's/^(TCPSocket.*)/#${1}/' ${CLAMD_CONF}
-    perl -pi -e 's#^(TCPAddr).*#${1} $ENV{'CLAMD_LISTEN_ADDR'}#' ${CLAMD_CONF}
-    perl -pi -e 's#^(LogFile).*#${1} $ENV{'CLAMD_LOGFILE'}#' ${CLAMD_CONF}
+    perl -pi -e 's#^(TCPAddr).*#${1} $ENV{CLAMD_LISTEN_ADDR}#' ${CLAMD_CONF}
+    perl -pi -e 's#^(LogFile).*#${1} $ENV{CLAMD_LOGFILE}#' ${CLAMD_CONF}
     # Set CLAMD_LOCAL_SOCKET
     # - for clamav < 0.9.6
-    perl -pi -e 's#^(LocalSocket).*#${1} $ENV{'CLAMD_LOCAL_SOCKET'}#' ${CLAMD_CONF}
+    perl -pi -e 's#^(LocalSocket).*#${1} $ENV{CLAMD_LOCAL_SOCKET}#' ${CLAMD_CONF}
     # - for clamav = 0.9.6
-    perl -pi -e 's-^#(LocalSocket).*-${1} $ENV{'CLAMD_LOCAL_SOCKET'}-' ${CLAMD_CONF}
+    perl -pi -e 's-^#(LocalSocket).*-${1} $ENV{CLAMD_LOCAL_SOCKET}-' ${CLAMD_CONF}
 
     ECHO_DEBUG "Configure freshclam: ${FRESHCLAM_CONF}."
     perl -pi -e 's-^#(PidFile)(.*)-${1} $ENV{FRESHCLAM_PID_FILE}-' ${FRESHCLAM_CONF}
-    perl -pi -e 's#^(UpdateLogFile).*#${1} $ENV{'FRESHCLAM_LOGFILE'}#' ${CLAMD_CONF}
+    perl -pi -e 's#^(UpdateLogFile).*#${1} $ENV{FRESHCLAM_LOGFILE}#' ${CLAMD_CONF}
 
     # Official database only
-    perl -pi -e 's-^#(OfficialDatabaseOnly).*#${1} yes#' ${CLAMD_CONF}
+    perl -pi -e 's/^#(OfficialDatabaseOnly).*/${1} yes/' ${CLAMD_CONF}
 
     if [ X"${DISTRO}" == X"RHEL" ]; then
         ECHO_DEBUG "Copy freshclam init startup script and enable it."

File iRedMail/functions/cleanup.sh

         # - FreeBSD: sendmail is binding to port '25'
         # - Gentoo: some services may require system reboot
         cat <<EOF
-* Please reboot your system to enable mail related services.
+* Please reboot your system to enable mail services.
 *
 EOF
 fi