Zhang Huangbin avatar Zhang Huangbin committed d0d179c

Drop support for Gentoo.

Comments (0)

Files changed (24)

iRedMail/ChangeLog

 iRedMail-0.8.6:
     * Drop support for below releases:
         + Debian 6 (squeeze)
+        + Gentoo
 
 iRedMail-0.8.5:
     * Use EPEL yum repo on RHEL/CentOS 6 by default.

iRedMail/conf/amavisd

     export AMAVISD_LDAP_SCHEMA_NAME='amavis.schema'
     export AMAVISD_VIRUSMAILS_DIR='/var/lib/amavis/virusmails'
 
-elif [ X"${DISTRO}" == X"GENTOO" ]; then
-    export AMAVISD_VERSION='2.7'
-
-    export AMAVISD_BIN='/usr/sbin/amavisd'
-    export AMAVISD_LDAP_SCHEMA_NAME='amavisd-new.schema'
-
-    export AMAVISD_CONF='/etc/amavisd.conf'
-
-    export AMAVISD_DKIM_CONF="${AMAVISD_CONF}"
-    export AMAVISD_MYHOME='/var/amavis'
-    export AMAVISD_QUARANTINEDIR="${AMAVISD_MYHOME}/quarantine"
-    export AMAVISD_TEMPDIR="${AMAVISD_MYHOME}/tmp"
-
 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
     export AMAVISD_VERSION='2.7'
 

iRedMail/conf/apache_php

     export PHP_INI='/etc/php5/apache2/php.ini'
     export PHP_INI_CONF_DIR='/etc/php5/apache2/conf.d/'
 
-elif [ X"${DISTRO}" == X"GENTOO" ]; then
-    # Apache configuration files.
-    export HTTPD_CONF_ROOT="/etc/apache2"
-    export HTTPD_CONF="${HTTPD_CONF_ROOT}/modules.d/00_default_settings.conf"
-    export HTTPD_CONF_DIR="${HTTPD_CONF_ROOT}/modules.d"
-    export HTTPD_SSL_CONF="${HTTPD_CONF_ROOT}/vhosts.d/00_default_ssl_vhost.conf"
-    export HTTPD_WSGI_CONF="${HTTPD_CONF_DIR}/70_mod_wsgi.conf"
-    export HTTPD_SYSCONFIG_CONF="${ETC_SYSCONFIG_DIR}/apache2"
-
-    # Web data.
-    export HTTPD_SERVERROOT='/var/www'
-    export HTTPD_DOCUMENTROOT="${HTTPD_SERVERROOT}/localhost/htdocs"
-
-    # Daemon user.
-    export HTTPD_USER='apache'
-    export HTTPD_GROUP='apache'
-
-    # Log file location.
-    export HTTPD_LOG_ACCESSLOG='/var/log/apache2/access_log'
-    export HTTPD_LOG_ERRORLOG='/var/log/apache2/error_log'
-
-    # ---- PHP ----
-    export PHP_INI='/etc/php/apache2-php5.3/php.ini'
-
 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
     export HTTPD_RC_SCRIPT_NAME='apache22'
 

iRedMail/conf/awstats

     # This path will be changed in 'functions/awstats.sh'.
     export AWSTATS_CGI_DIR="/usr/lib/cgi-bin"
 
-elif [ X"${DISTRO}" == X"GENTOO" ]; then
-    export AWSTATS_CONF_SAMPLE="${AWSTATS_CONF_DIR}/awstats.model.conf"
-    export AWSTATS_HTTPD_ROOT='/usr/share/awstats/wwwroot'
-    export AWSTATS_CGI_DIR="${AWSTATS_HTTPD_ROOT}/cgi-bin"
-    export AWSTATS_ICON_DIR="${AWSTATS_HTTPD_ROOT}/icon"
-    export AWSTATS_CSS_DIR="${AWSTATS_HTTPD_ROOT}/css"
-    export AWSTATS_JS_DIR="${AWSTATS_HTTPD_ROOT}/js"
-
 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
     export AWSTATS_HTTPD_ROOT="${HTTPD_SERVERROOT}/awstats"
     export AWSTATS_ICON_DIR="${AWSTATS_HTTPD_ROOT}/icon"

iRedMail/conf/clamav

 fi
 
 # Clamd local socket.
-if [ X"${DISTRO}" == X"GENTOO" \
-    -o X"${DISTRO}" == X"FREEBSD" \
-    ]; then
+if [ X"${DISTRO}" == X"FREEBSD" ]; then
     export CLAMD_LOCAL_SOCKET='/var/run/clamav/clamd.sock'
 fi

iRedMail/conf/core

     done
 }
 
-enable_service_gentoo()
-{
-    services="$@"
-    for i in $services; do
-        if [ -x /etc/init.d/$i ]; then
-            ECHO_DEBUG "Enable service: $i."
-            rc-update add $i default
-        fi
-    done
-}
-
-disable_service_gentoo()
-{
-    services="$@"
-    for i in $services; do
-        if [ -x /etc/init.d/$i ]; then
-            ECHO_DEBUG "Disable service: $i."
-            rc-update del $i default
-        fi
-    done
-}
-
 service_control()
 {
     service="$1"
 
     # Create necessary directories.
     mkdir -p ${SSL_KEY_DIR} ${SSL_CERT_DIR} 2>/dev/null
-    [ X"${DISTRO}" == X'GENTOO' ] && chmod o+rx ${SSL_KEY_DIR}
 
     openssl req \
         -x509 -nodes -days 3650 -newkey rsa:${SSL_KEY_SIZE} \
     [ X"$?" != X"0" ] && ECHO_ERROR "Package removed failed, please check the terminal output."
 }
 
-# Install/Remove binary packages on Gentoo
-install_pkg_gentoo()
-{
-    ECHO_INFO "Installing package(s) with option(s) '${GENTOO_EMERGE_INSTALL_OPTIONS}': $@"
-    pkgs_total="$(echo $@ | wc -w)"
-    pkgs_counter=1
-    for pkg in $@; do
-        if [ X"${pkg}" != X'' ]; then
-            portname="$( echo ${pkg} | tr -d '-' | tr -d '/' | tr -d '\.' )"
-            status="\$status_install_port_$portname"
-            if [ X"$(eval echo ${status})" != X"DONE" ]; then
-                ECHO_INFO "Installing package (${pkgs_counter} of ${pkgs_total}): ${pkg}"
-                echo "export status_install_port_${portname}='processing'" >> ${STATUS_FILE}
-
-                # Get time as a UNIX timestamp (seconds elapsed since Jan 1, 1970 0:00 UTC)
-                port_start_time="$(date +%s)"
-
-                emerge ${GENTOO_EMERGE_INSTALL_OPTIONS} ${pkg}
-
-                if [ X"$?" == X"0" ]; then
-                    # Log used time
-                    used_time="$(($(date +%s)-port_start_time))"
-
-                    echo "export status_install_port_${portname}='DONE'  # ${used_time} seconds, ~$((used_time/60)) minutes" >> ${STATUS_FILE}
-                else
-                    ECHO_ERROR "Installation failed, please check the terminal output."
-                    ECHO_ERROR "If you're not sure what the problem is, try to get help in iRedMail"
-                    ECHO_ERROR "forum: http://www.iredmail.org/forum/"
-                    exit 255
-                fi
-            else
-                ECHO_INFO "Skip package: ${pkg}."
-            fi
-            pkgs_counter=$((pkgs_counter+1))
-        fi
-    done
-}
-
-remove_pkg_gentoo()
-{
-    ECHO_INFO "Removing package(s): $@"
-    emerge -C $@
-    [ X"$?" != X"0" ] && ECHO_ERROR "Package removed failed, please check the terminal output."
-}
-
-gentoo_mask_package()
-{
-    [ -f ${GENTOO_CONF_PACKAGE_MASK} ] || touch ${GENTOO_CONF_PACKAGE_MASK}
-    for pkg in $@; do
-        comment_mark="# ${PROG_NAME}-${pkg}"
-        if ! grep "^${comment_mark}$" ${GENTOO_CONF_PACKAGE_MASK} &>/dev/null; then
-            ECHO_DEBUG "Mask packages in ${GENTOO_CONF_PACKAGE_MASK}: $@"
-            echo "${comment_mark}" >> ${GENTOO_CONF_PACKAGE_MASK}
-            echo "${pkg}" >> ${GENTOO_CONF_PACKAGE_MASK}
-        else
-            ECHO_DEBUG "Skip masking packages in ${GENTOO_CONF_PACKAGE_MASK}: $@"
-        fi
-    done
-}
-
-gentoo_unmask_package()
-{
-    [ -f ${GENTOO_CONF_PACKAGE_UNMASK} ] || touch ${GENTOO_CONF_PACKAGE_UNMASK}
-    for pkg in $@; do
-        comment_mark="# ${PROG_NAME}-${pkg}"
-        if ! grep "^${comment_mark}$" ${GENTOO_CONF_PACKAGE_UNMASK} &>/dev/null; then
-            ECHO_DEBUG "Unmask packages in ${GENTOO_CONF_PACKAGE_UNMASK}: $@"
-            echo "${comment_mark}" >> ${GENTOO_CONF_PACKAGE_UNMASK}
-            echo "${pkg}" >> ${GENTOO_CONF_PACKAGE_UNMASK}
-        else
-            ECHO_DEBUG "Skip unmasking packages in ${GENTOO_CONF_PACKAGE_UNMASK}: $@"
-        fi
-    done
-}
-
-gentoo_add_use_flags()
-{
-    # USAGE: gentoo_add_use_flags pkg_name USE_flags
-    [ -f ${GENTOO_CONF_PACKAGE_USE} ] || touch ${GENTOO_CONF_PACKAGE_USE}
-    if [ X"$#" == X'2' ]; then
-        #echo "${1} ${2}" >> /etc/portage/package.use
-        pkg="${1}"
-        use_flags="${2}"
-        comment_mark="# ${PROG_NAME}-${pkg}"
-        if ! grep "^${comment_mark}$" ${GENTOO_CONF_PACKAGE_USE} &>/dev/null; then
-            ECHO_DEBUG "Add USE flags for package ${pkg} in ${GENTOO_CONF_PACKAGE_USE}."
-            echo "${comment_mark}" >> ${GENTOO_CONF_PACKAGE_USE}
-            echo "${pkg} ${use_flags}" >> ${GENTOO_CONF_PACKAGE_USE}
-        else
-            ECHO_DEBUG "Skip adding USE flags for package ${pkg} in ${GENTOO_CONF_PACKAGE_USE}."
-        fi
-    fi
-}
-
-gentoo_add_make_conf()
-{
-    # USAGE: gentoo_add_make_conf VARIABLE VALUE
-    if [ X"$#" == X'2' ]; then
-        export VAR="${1}"
-        export VALUE="${2}"
-
-        # Comment out old setting.
-        perl -pi -e 's/($ENV{VAR}.*)/#${1}/' ${GENTOO_CONF_MAKE_CONF}
-
-        # Add new setting.
-        echo "${VAR}='${VALUE}'" >> ${GENTOO_CONF_MAKE_CONF}
-
-        unset VAR VALUE
-    fi
-}
-
 enable_service_openbsd()
 {
     # USAGE: enable_service_openbsd flag value

iRedMail/conf/fail2ban

     export FAIL2BAN_SSHD_LOGFILE='/var/log/auth.log'
 elif [ X"${DISTRO}" == X"SUSE" ]; then
     export FAIL2BAN_SSHD_LOGFILE='/var/log/messages'
-elif [ X"${DISTRO}" == X"GENTOO" ]; then
-    export FAIL2BAN_SSHD_LOGFILE='/var/log/messages'
 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
     export FAIL2BAN_CONF_ROOT='/usr/local/etc/fail2ban'
     export FAIL2BAN_SSHD_LOGFILE='/var/log/auth.log'

iRedMail/conf/global

 
         # Override settings.
         export SHELL_NOLOGIN='/usr/sbin/nologin'
-
-    elif [ -f /etc/gentoo-release ]; then
-        # Gentoo
-        export DISTRO='GENTOO'
-
     else
         export UNSUPPORTED_RELEASE='YES'
     fi
     # Directory used to store SSL/TLS key/cert file.
     export SSL_FILE_DIR="/etc/ssl"
 
-elif [ X"${DISTRO}" == X"GENTOO" ]; then
-    # Gentoo
-    # System user: root. Note: not all OSes have group 'root'.
-    export SYS_ROOT_USER='root'
-    export SYS_ROOT_GROUP='root'
-
-    export install_pkg='install_pkg_gentoo'
-    export remove_pkg="remove_pkg_gentoo"
-    export LIST_ALL_PKGS='qlist --installed'
-    export LIST_FILES_IN_PKG='equery files'
-
-    # Service control. Defined in file: conf/core.
-    export enable_service='enable_service_gentoo'
-    export disable_service='disable_service_gentoo'
-
-    # Syslog config file: syslog-ng.
-    export SYSLOG_CONF='/etc/syslog-ng/syslog-ng.conf'
-    export SYSLOG_POSTROTATE_CMD=''
-
-    # Crontab related.
-    export CRON_SPOOL_DIR='/var/spool/cron/crontabs'
-
-    # Directory /etc/sysconfig/ on RHEL/CentOS.
-    export ETC_SYSCONFIG_DIR='/etc/conf.d'
-
-    # iptables rule file.
-    export FIREWALL_RULE_CONF="/var/lib/iptables/rules-save"
-
-    # Directory used to store SSL/TLS key/cert file.
-    export SSL_FILE_DIR="/etc/ssl"
-
-    # Override default value.
-    export VMAIL_GROUP_NAME='mail'
-    export PKG_DIALOG="dialog"
-    export PKG_BZIP2="bzip2"
-
-    # make.conf
-    export GENTOO_CONF_MAKE_CONF='/etc/portage/make.conf'
-
-    # Options used for install package
-    export GENTOO_EMERGE_INSTALL_OPTIONS='--binpkg-respect-use --buildpkg'
-    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'
-
 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
     export ENABLE_BACKEND_PGSQL='YES'
 

iRedMail/conf/mysql

 elif [ X"${DISTRO}" == X"UBUNTU" -o X"${DISTRO}" == X"DEBIAN" ]; then
     export MYSQL_MY_CNF='/etc/mysql/my.cnf'
 
-elif [ X"${DISTRO}" == X"GENTOO" ]; then
-    export MYSQL_MY_CNF='/etc/mysql/my.cnf'
-    export MYSQL_SOCKET='/var/run/mysqld/mysql.sock'
-
 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
     export MYSQL_RC_SCRIPT_NAME='mysql-server'
     export MYSQL_SOCKET='/tmp/mysql.sock'

iRedMail/conf/openldap

     # Module related.
     export OPENLDAP_MODULE_PATH='/usr/lib/ldap'
 
-elif [ X"${DISTRO}" == X"GENTOO" ]; then
-    export OPENLDAP_DB_CONFIG_SAMPLE="${OPENLDAP_CONF_ROOT}/DB_CONFIG.example"
-    export OPENLDAP_SYSCONFIG_CONF="${ETC_SYSCONFIG_DIR}/slapd"
-
-    # Module related.
-    export OPENLDAP_MODULE_PATH='/usr/lib/openldap/openldap'
-
-    # Override default path
-    export OPENLDAP_DATA_DIR='/var/lib/openldap-data'
-
 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
     # Configuration files.
     export OPENLDAP_CONF_ROOT='/usr/local/etc/openldap'

iRedMail/conf/policyd

     # Path of policyd-clean
     export POLICYD_CLEANUP_BIN='/usr/lib/postfix-policyd/cleanup'
 
-elif [ X"${DISTRO}" == X"GENTOO" ]; then
-    export PKG_POLICYD='policyd'
-    export POLICYD_CONF='/etc/policyd.conf'
-    export POLICYD_THROTTLE_CONF='/etc/policyd_sender_throttle.conf'
-    export POLICYD_THROTTLE_PIDFILE='/var/run/policyd_sender_throttle.pid'
-
-    # Database.
-    export POLICYD_DB_NAME='policyd'
-    export POLICYD_DB_USER='policyd'
-
-    # Path of policyd-clean
-    export POLICYD_CLEANUP_BIN='/usr/sbin/policyd_cleanup'
-
 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
     export PKG_POLICYD='postfix-policyd-sf'
     export POLICYD_CONF='/usr/local/etc/postfix-policyd-sf.conf'

iRedMail/conf/postgresql

 
 export PGSQL_SYS_USER_HOME='/var/lib/postgresql'
 
-export PGSQL_VERSION='9.1'  # Required on Gentoo
+export PGSQL_VERSION='9.1'
 export PGSQL_RC_SCRIPT_NAME='postgresql'
 
 export PGSQL_VMAIL_STRUCTURE_SAMPLE="${SAMPLE_DIR}/iredmail.pgsql"
     export PGSQL_CONF_POSTGRESQL="${PGSQL_DATA_DIR}/postgresql.conf"
     export PGSQL_CONF_PG_HBA="${PGSQL_DATA_DIR}/pg_hba.conf"
 
-elif [ X"${DISTRO}" == X'GENTOO' ]; then
-    export PGSQL_CONF_DIR="/etc/postgresql-${PGSQL_VERSION}"
-    export PGSQL_CONF_POSTGRESQL="${PGSQL_CONF_DIR}/postgresql.conf"
-    export PGSQL_CONF_PG_HBA="${PGSQL_CONF_DIR}/pg_hba.conf"
-    export PGSQL_DATA_DIR="/var/lib/postgresql/${PGSQL_VERSION}/data"
-
-    export PGSQL_RC_SCRIPT_NAME="postgresql-${PGSQL_VERSION}"
-
 elif [ X"${DISTRO}" == X'FREEBSD' ]; then
     export PGSQL_SYS_USER='pgsql'
     export PGSQL_SYS_GROUP='pgsql'

iRedMail/functions/amavisd.sh

     ECHO_INFO "Configure Amavisd-new (interface between MTA and content checkers)."
 
     if [ X"${DISTRO}" == X"RHEL" ]; then
-        [ X"${DISTRO_VERSION}" == X"6" ] && \
-            usermod -G ${AMAVISD_SYS_GROUP} ${CLAMAV_USER} >/dev/null
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
         usermod -G ${AMAVISD_SYS_GROUP} ${CLAMAV_USER} >/dev/null
     fi
 
 {
     if [ X"${DISTRO}" == X"RHEL" \
         -o X"${DISTRO}" == X'SUSE' \
-        -o X"${DISTRO}" == X'GENTOO' \
         -o X"${DISTRO}" == X'FREEBSD' \
         -o X"${DISTRO}" == X'OPENBSD' \
         ]; then

iRedMail/functions/apache_php.sh

 
     elif [ X"${DISTRO}" == X"DEBIAN" \
         -o X"${DISTRO}" == X"UBUNTU" \
-        -o X"${DISTRO}" == X'GENTOO' \
         ]; then
         perl -pi -e 's#^([ \t]+SSLCertificateFile)(.*)#${1} $ENV{SSL_CERT_FILE}#' ${HTTPD_SSL_CONF}
         perl -pi -e 's#^([ \t]+SSLCertificateKeyFile)(.*)#${1} $ENV{SSL_KEY_FILE}#' ${HTTPD_SSL_CONF}
 
         [ X"${BACKEND}" == X"MYSQL" ] && a2enmod auth_mysql &>/dev/null
 
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        # Enable modules: php, wsgi
-        perl -pi -e 's#^(APACHE2_OPTS=.*)(")#${1} -D PHP5 -D WSGI${2}#' ${HTTPD_SYSCONFIG_CONF}
-
-        # Modules: ldap, authnz_ldap
-        [ X"${BACKEND}" == X"OPENLDAP" ] && \
-            perl -pi -e 's#^(APACHE2_OPTS=.*)(")#${1} -D LDAP -D AUTHNZ_LDAP${2}#' ${HTTPD_SYSCONFIG_CONF}
-
-        # Module: mod_auth_mysql
-        [ X"${BACKEND}" == X'MYSQL' ] && \
-            perl -pi -e 's#^(APACHE2_OPTS=.*)(")#${1} -D AUTH_MYSQL${2}#' ${HTTPD_SYSCONFIG_CONF}
-
-        # Module: mod_auth_pgsql
-        [ X"${BACKEND}" == X'PGSQL' ] && \
-            perl -pi -e 's#^(APACHE2_OPTS=.*)(")#${1} -D AUTH_PGSQL${2}#' ${HTTPD_SYSCONFIG_CONF}
-
-        # Disable modules: mod_proxy_scgi
-        perl -pi -e 's/^(LoadModule.*mod_proxy_scgi.*)/#${1}/' ${HTTPD_CONF_ROOT}/httpd.conf
     elif [ X"${DISTRO}" == X'FREEBSD' ]; then
         [ X"${BACKEND}" == X'OPENLDAP' ] && \
             perl -pi -e 's/^#(LoadModule.*ldap_module.*)/${1}/' ${HTTPD_CONF}
             perl -pi -e 's/^#(LoadModule.*auth_pgsql_module.*)/${1}/' ${HTTPD_CONF}
     fi
 
-    if [ X"${DISTRO}" == X'GENTOO' ]; then
-        # Change 'Deny from all' to 'Allow from all'.
-        sed -i '/Order deny,allow/,/Deny from all/s#Deny\ from\ all#Allow\ from\ all#' ${HTTPD_CONF_DIR}/00_default_settings.conf
-        sed -i '/Order deny,allow/,/All from all/s#Order\ deny,allow#Order\ allow,deny#' ${HTTPD_CONF_DIR}/00_default_settings.conf
-
-    elif [ X"${DISTRO}" == X'FREEBSD' ]; then
+    if [ X"${DISTRO}" == X'FREEBSD' ]; then
         ECHO_DEBUG "Configure Apache."
         # With Apache2.2 it now wants to load an Accept Filter.
         echo 'accf_http_load="YES"' >> /boot/loader.conf &>/dev/null

iRedMail/functions/awstats.sh

         # Use mod_auth_mysql.
         if [ X"${DISTRO}" == X"RHEL" \
             -o X"${DISTRO}" == X"SUSE" \
-            -o X"${DISTRO}" == X"GENTOO" \
             -o X"${DISTRO}" == X"FREEBSD" \
             ]; then
             cat >> ${AWSTATS_HTTPD_CONF} <<EOF
 
             # openSUSE & FreeBSD special.
             if [ X"${DISTRO}" == X"SUSE" \
-                -o X"${DISTRO}" == X"GENTOO" \
                 -o X"${DISTRO}" == X"FREEBSD" \
                 ]; then
                 echo "    AuthBasicAuthoritative Off" >> ${AWSTATS_HTTPD_CONF}

iRedMail/functions/cleanup.sh

 
 cleanup_update_compile_spamassassin_rules()
 {
-    # Required on Gentoo and FreeBSD to start Amavisd-new.
+    # Required on FreeBSD to start Amavisd-new.
     ECHO_INFO "Updating SpamAssassin rules (sa-update), please wait ..."
     ${BIN_SA_UPDATE} &>/dev/null
 
     ${DOVECOT_DELIVER} -c ${DOVECOT_CONF} -f root@${HOSTNAME} -d ${tip_recipient} < /tmp/.links.eml
     rm -f /tmp/.links.eml &>/dev/null
 
-    if [ X"${DISTRO}" == X'GENTOO' \
-        -o X"${DISTRO}" == X'FREEBSD' \
-        -o X"${DISTRO}" == X'OPENBSD' \
-        ]; then
+    if [ X"${DISTRO}" == X'FREEBSD' -o X"${DISTRO}" == X'OPENBSD' ]; then
         check_status_before_run cleanup_update_compile_spamassassin_rules
     fi
 
 
     # Reboot system to enable mail related services.
     # - FreeBSD: sendmail is binding to port '25'
-    # - Gentoo: some services may require system reboot
     cat <<EOF
 
 ********************************************************************

iRedMail/functions/cluebringer.sh

     # User/group will be created during installing binary package on:
     #   - Ubuntu
     #   - openSUSE
-    #   - Gentoo
     if [ X"${DISTRO}" == X'RHEL' -o X"${DISTRO}" == X'SUSE' ]; then
         groupadd ${CLUEBRINGER_GROUP}
         useradd -m -d ${CLUEBRINGER_USER_HOME} -s ${SHELL_NOLOGIN} -g ${CLUEBRINGER_GROUP} ${CLUEBRINGER_USER}

iRedMail/functions/iredapd.sh

         cp ${IREDAPD_ROOT_DIR}/iredapd/rc_scripts/iredapd.debian ${DIR_RC_SCRIPTS}/iredapd
     elif [ X"${DISTRO}" == X"SUSE" ]; then
         cp ${IREDAPD_ROOT_DIR}/iredapd/rc_scripts/iredapd.opensuse ${DIR_RC_SCRIPTS}/iredapd
-    elif [ X"${DISTRO}" == X"GENTOO" ]; then
-        cp ${IREDAPD_ROOT_DIR}/iredapd/rc_scripts/iredapd.gentoo ${DIR_RC_SCRIPTS}/iredapd
     elif [ X"${DISTRO}" == X"FREEBSD" ]; then
         cp ${IREDAPD_ROOT_DIR}/iredapd/rc_scripts/iredapd.freebsd ${DIR_RC_SCRIPTS}/iredapd
     elif [ X"${DISTRO}" == X'OPENBSD' ]; then

iRedMail/functions/mysql.sh

 
     ECHO_DEBUG "Starting MySQL."
 
-    # Gentoo, OpenBSD: Initial MySQL database first
-    if [ X"${DISTRO}" == X"GENTOO" ]; then
-        /usr/bin/mysql_install_db &>/dev/null
-    elif [ X"${DISTRO}" == X'OPENBSD' ]; then
+    # Initial MySQL database first
+    if [ X"${DISTRO}" == X'OPENBSD' ]; then
         /usr/local/bin/mysql_install_db &>/dev/null
     fi
 

iRedMail/functions/openldap.sh

         # Set config backend.
         perl -pi -e 's#^(OPENLDAP_CONFIG_BACKEND=).*#${1}"files"#' ${OPENLDAP_SYSCONFIG_CONF}
 
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        # Comment out default option which uses slapd.d.
-        perl -pi -e 's/^(OPTS=.*)/#${1}/' ${OPENLDAP_SYSCONFIG_CONF}
-
-        # Enable slapd.conf instead of slapd.d.
-        cat >> ${OPENLDAP_SYSCONFIG_CONF} <<EOF
-OPTS="-f ${OPENLDAP_SLAPD_CONF} -h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"
-EOF
     elif [ X"${DISTRO}" == X'OPENBSD' ]; then
         # Enable TLS/SSL support
         cat >> ${RC_CONF_LOCAL} <<EOF
     if [ X"${DISTRO}" == X'FREEBSD' -o X"${DISTRO}" == X'OPENBSD' ]; then
         echo -e '!slapd' >> ${SYSLOG_CONF}
         echo -e "*.*\t\t\t\t\t\t${OPENLDAP_LOGFILE}" >> ${SYSLOG_CONF}
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        cat >> ${SYSLOG_CONF} <<EOF
-# OpenLDAP
-filter f_local4         {facility(local4); };
-destination slapd {file("/var/log/openldap.log"); };
-log {source(src); filter(f_local4); destination(slapd); };
-EOF
     else
         echo -e "local4.*\t\t\t\t\t\t-${OPENLDAP_LOGFILE}" >> ${SYSLOG_CONF}
     fi

iRedMail/functions/packages.sh

     elif [ X"${DISTRO}" == X"UBUNTU" ]; then
         # Ubuntu >= 9.10.
         ENABLED_SERVICES="rsyslog ${ENABLED_SERVICES}"
-    elif [ X"${DISTRO}" == X"GENTOO" ]; then
-        ENABLED_SERVICES="syslog-ng ${ENABLED_SERVICES}"
-        gentoo_add_use_flags 'net-nds/openldap' 'crypt ipv6 ssl tcpd -overlays perl sasl syslog'
-        gentoo_add_use_flags 'dev-db/mysql' 'berkdb community perl ssl big-tables cluster'
-        gentoo_add_use_flags 'dev-db/postgresql-server' 'nls pam doc perl python xml'
     fi
 
     #################################################
         elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
             ALL_PKGS="${ALL_PKGS} postfix-ldap slapd ldap-utils libnet-ldap-perl mysql-server mysql-client"
 
-        elif [ X"${DISTRO}" == X"GENTOO" ]; then
-            ALL_PKGS="${ALL_PKGS} openldap mysql"
-
         elif [ X"${DISTRO}" == X'OPENBSD' ]; then
             if [ X"${BACKEND_ORIG}" == X'OPENLDAP' ]; then
                 ALL_PKGS="${ALL_PKGS} openldap-server"
             # For Awstats.
             [ X"${USE_AWSTATS}" == X"YES" ] && ALL_PKGS="${ALL_PKGS} libapache2-mod-auth-mysql"
 
-        elif [ X"${DISTRO}" == X'GENTOO' ]; then
-            ALL_PKGS="${ALL_PKGS} mysql"
-
         elif [ X"${DISTRO}" == X'OPENBSD' ]; then
             ALL_PKGS="${ALL_PKGS} mysql-client cyrus-sasl--mysql mysql-server"
             PKG_SCRIPTS="${PKG_SCRIPTS} ${MYSQL_RC_SCRIPT_NAME}"
             # postgresql-contrib provides extension 'dblink' used in Roundcube password plugin.
             ALL_PKGS="${ALL_PKGS} postgresql postgresql-client postgresql-contrib postfix-pgsql"
 
-        elif [ X"${DISTRO}" == X'GENTOO' ]; then
-            ALL_PKGS="${ALL_PKGS} postgresql-server mod_auth_pgsql"
-
         elif [ X"${DISTRO}" == X'OPENBSD' ]; then
             ALL_PKGS="${ALL_PKGS} postgresql-client cyrus-sasl--pgsql postgresql-server postgresql-contrib"
             PKG_SCRIPTS="${PKG_SCRIPTS} ${PGSQL_RC_SCRIPT_NAME}"
         [ X"${BACKEND}" == X'OPENLDAP' -o X"${BACKEND}" == X'MYSQL' ] && ALL_PKGS="${ALL_PKGS} php5-mysql"
         [ X"${BACKEND}" == X'PGSQL' ] && ALL_PKGS="${ALL_PKGS} php5-pgsql"
 
-    elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
-        ALL_PKGS="${ALL_PKGS} apache2 apache2-mpm-prefork apache2.2-common libapache2-mod-php5 php5-cli php5-imap php5-gd php5-mcrypt php5-mysql php5-ldap php5-pgsql"
-
-        # Authentication modules
-        ALL_PKGS="${ALL_PKGS} libapache2-mod-auth-mysql libapache2-mod-auth-pgsql"
-
-        if [ X"${BACKEND}" == X"OPENLDAP" ]; then
-            ALL_PKGS="${ALL_PKGS} php-net-ldap2"
-        fi
-
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        ALL_PKGS="${ALL_PKGS} apache php"
-        gentoo_add_use_flags 'dev-libs/apr-util' 'ldap'
-        gentoo_add_use_flags 'www-servers/apache' 'ssl doc ldap suexec'
-        gentoo_add_make_conf 'APACHE2_MODULES' 'actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias auth_digest authn_dbd log_forensic proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy_scgi substitute version'
-        gentoo_add_make_conf 'APACHE2_MPMS' 'prefork'
-
-        gentoo_add_use_flags 'dev-lang/php' 'berkdb bzip2 cli crypt ctype fileinfo filter hash iconv ipv6 json nls phar posix readline session simplexml ssl tokenizer unicode xml zlib apache2 calendar -cdb cgi cjk curl curlwrappers doc flatfile fpm ftp gd gmp imap inifile intl kerberos ldap ldap-sasl mhash mysql mysqli mysqlnd odbc pdo postgres snmp soap sockets spell sqlite sqlite3 suhosin tidy truetype wddx xmlreader xmlrpc xmlwriter xpm xsl zip'
-
-        [ X"${BACKEND}" == X'MYSQL' ] && ALL_PKGS="${ALL_PKGS} mod_auth_mysql"
     elif [ X"${DISTRO}" == X'OPENBSD' ]; then
         ALL_PKGS="${ALL_PKGS} php php-bz2 php-imap php-mcrypt php-gd"
 
         ALL_PKGS="${ALL_PKGS} postfix"
     elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
         ALL_PKGS="${ALL_PKGS} postfix postfix-pcre"
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        ALL_PKGS="${ALL_PKGS} postfix"
-        #gentoo_unmask_package 'mail-mta/ssmtp'
-        gentoo_add_use_flags 'mail-mta/postfix' 'ipv6 pam ssl cdb dovecot-sasl hardened ldap ldap-bind mbox mysql postgres sasl'
     elif [ X"${DISTRO}" == X'OPENBSD' ]; then
         #PKG_SCRIPTS: Postfix will flush the queue when startup, so we should
         #             start amavisd before postfix since Amavisd is content
             ENABLED_SERVICES="${ENABLED_SERVICES} ${POLICYD_RC_SCRIPT_NAME}"
         fi
 
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        ALL_PKGS="${ALL_PKGS} policyd"
-        ENABLED_SERVICES="${ENABLED_SERVICES} ${POLICYD_RC_SCRIPT_NAME}"
     elif [ X"${DISTRO}" == X'OPENBSD' ]; then
         # No port available.
         :
         elif [ X"${BACKEND}" == X"PGSQL" ]; then
             ALL_PKGS="${ALL_PKGS} dovecot-pgsql"
         fi
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        ALL_PKGS="${ALL_PKGS} dovecot"
-        DISABLED_SERVICES="${DISABLED_SERVICES} saslauthd"
-        gentoo_add_use_flags 'net-mail/dovecot' 'bzip2 ipv6 maildir pam ssl zlib caps doc kerberos ldap managesieve mbox mdbox mysql postgres sdbox sieve sqlite suid'
 
     elif [ X"${DISTRO}" == X'OPENBSD' ]; then
         ALL_PKGS="${ALL_PKGS} dovecot dovecot-pigeonhole"
         ENABLED_SERVICES="${ENABLED_SERVICES} ${CLAMAV_FRESHCLAMD_RC_SCRIPT_NAME}"
         DISABLED_SERVICES="${DISABLED_SERVICES} spamassassin"
 
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        ALL_PKGS="${ALL_PKGS} amavisd-new spamassassin clamav altermime Mail-SPF"
-        DISABLED_SERVICES="${DISABLED_SERVICES} spamd"
-
-        gentoo_add_use_flags 'mail-filter/amavisd-new' 'dkim ldap mysql postgres razor snmp spamassassin'
-        gentoo_add_use_flags 'mail-filter/spamassassin' 'berkdb ipv6 ssl doc ldap mysql postgres sqlite'
-        gentoo_add_use_flags 'app-antivirus/clamav' 'bzip2 iconv ipv6'
-        gentoo_add_use_flags 'net-analyzer/net-snmp' 'bzip2 ipv6 ssl tcpd zlib perl'
-
     elif [ X"${DISTRO}" == X'OPENBSD' ]; then
         [ X"${BACKEND}" == X'OPENLDAP' ] && ALL_PKGS="${ALL_PKGS} p5-ldap p5-DBD-mysql"
         [ X"${BACKEND}" == X'MYSQL' ] && ALL_PKGS="${ALL_PKGS} p5-DBD-mysql"
             ALL_PKGS="${ALL_PKGS} phpPgAdmin"
         elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
             ALL_PKGS="${ALL_PKGS} phppgadmin"
-        elif [ X"${DISTRO}" == X'GENTOO' ]; then
-            ALL_PKGS="${ALL_PKGS} phppgadmin"
         elif [ X"${DISTRO}" == X'OPENBSD' ]; then
             ALL_PKGS="${ALL_PKGS} phpPgAdmin"
         fi
         [ X"${BACKEND}" == X'MYSQL' ] && ALL_PKGS="${ALL_PKGS} python-mysqldb"
         [ X"${BACKEND}" == X'PGSQL' ] && ALL_PKGS="${ALL_PKGS} python-psycopg2"
 
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        [ X"${BACKEND}" == X'OPENLDAP' ] && ALL_PKGS="${ALL_PKGS} python-ldap mysql-python"
-        [ X"${BACKEND}" == X'MYSQL' ] && ALL_PKGS="${ALL_PKGS} mysql-python"
-        [ X"${BACKEND}" == X'PGSQL' ] && ALL_PKGS="${ALL_PKGS} psycopg"
-
     elif [ X"${DISTRO}" == X'OPENBSD' ]; then
         [ X"${BACKEND}" == X'OPENLDAP' ] && ALL_PKGS="${ALL_PKGS} py-ldap py-mysql"
         [ X"${BACKEND}" == X'MYSQL' ] && ALL_PKGS="${ALL_PKGS} py-mysql"
 
     elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
         ALL_PKGS="${ALL_PKGS} libapache2-mod-wsgi python-jinja2 python-netifaces python-webpy"
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        ALL_PKGS="${ALL_PKGS} jinja webpy mod_wsgi"
 
-        gentoo_add_use_flags 'dev-python/jinja' 'examples i18n vim-syntax'
-        # Don't use python-3
-        gentoo_mask_package '<=dev-lang/python-3.0'
     elif [ X"${DISTRO}" == X'OPENBSD' ]; then
         ALL_PKGS="${ALL_PKGS} py-jinja2 py-webpy py-flup"
     fi
             ALL_PKGS="${ALL_PKGS} awstats"
         elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
             ALL_PKGS="${ALL_PKGS} awstats"
-        elif [ X"${DISTRO}" == X'GENTOO' ]; then
-            ALL_PKGS="${ALL_PKGS} awstats"
-            gentoo_add_use_flags 'www-misc/awstats' 'ipv6 geoip'
         elif [ X"${DISTRO}" == X'OPENBSD' ]; then
             # No port available.
             :
     elif [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
         ALL_PKGS="${ALL_PKGS} bzip2 acl patch cron tofrodos logwatch"
         ENABLED_SERVICES="${ENABLED_SERVICES} cron"
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        ALL_PKGS="${ALL_PKGS} dos2unix logwatch"
     elif [ X"${DISTRO}" == X'OPENBSD' ]; then
         ALL_PKGS="${ALL_PKGS} bzip2"
     fi

iRedMail/functions/policyd.sh

 EOF
         fi
 
-    elif [ X"${DISTRO}" == X'GENTOO' ]; then
-        cat >> ${tmp_sql} <<EOF
-CREATE DATABASE ${POLICYD_DB_NAME};
-USE ${POLICYD_DB_NAME}
--- Import SQL structure template.
-SOURCE ${SAMPLE_DIR}/policyd/DATABASE.mysql;
--- Grant privileges.
-GRANT SELECT,INSERT,UPDATE,DELETE ON ${POLICYD_DB_NAME}.* TO "${POLICYD_DB_USER}"@"${SQL_HOSTNAME}" IDENTIFIED BY "${POLICYD_DB_PASSWD}";
-FLUSH PRIVILEGES;
-EOF
-
     elif [ X"${DISTRO}" == X"FREEBSD" ]; then
         cat > ${tmp_sql} <<EOF
 CREATE DATABASE ${POLICYD_DB_NAME};

iRedMail/functions/postfix.sh

     postconf -e virtual_gid_maps="static:${VMAIL_USER_GID}"
     postconf -e virtual_mailbox_base="${STORAGE_BASE_DIR}"
 
-    if [ X"${DISTRO}" == X'GENTOO' ]; then
-        cat >> ${SYSLOG_CONF} <<EOF
-# Maillog
-filter f_maillog {facility(mail); };
-destination maillog {file("${MAILLOG}"); };
-log {source(src); filter(f_maillog); destination(maillog); };
-EOF
-    fi
-
     cat >> ${TIP_FILE} <<EOF
 Postfix (basic):
     * Configuration files:

iRedMail/pkgs/get_all.sh

     # Force update.
     ECHO_INFO "Resynchronizing the package index files (apt-get update) ..."
     ${APTGET} update
-elif [ X"${DISTRO}" == X'GENTOO' ]; then
-    # qlist is used to list all installed portages (qlist --installed).
-    check_pkg 'qlist' 'portage-utils'
-    check_pkg 'equery' 'gentoolkit'
-    check_pkg 'crontab' 'vixie-cron'
 fi
 
 check_status_before_run fetch_misc && \
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.