All pastes #16399 Raw Edit

Mine

public text v1 · immutable
#16399 ·published 2005-06-29 19:59 UTC
rendered paste body
--- xmail-1.21.ebuild.orig      2005-01-27 18:25:35.000000000 +0100
+++ xmail-1.21.ebuild   2005-06-29 21:58:13.000000000 +0200
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/mail-mta/xmail/xmail-1.21.ebuild,v 1.1 2005/01/27 17:25:35 superlag Exp $

-inherit eutils
+inherit eutils linux-info

 DESCRIPTION="The world's fastest email server"
 HOMEPAGE="http://www.xmailserver.org/"
@@ -15,9 +15,31 @@

 DEPEND="virtual/libc
        >=sys-apps/sed-4"
+RDEPEND="net-firewall/iptables"
 PROVIDE="virtual/mta"

 pkg_setup() {
+
+       linux-info_pkg_setup
+
+       if ! (linux_chkconfig_present NETFILTER); then
+               eerror "${P} requires netfilter/iptables support enabled in kernel!"
+               eerror
+               eerror "Recompile your kernel with CONFIG_NETFILTER and CONFIG_IP_NF_TARGET_REDIRECT"
+               eerror "support enabled and reboot. Then try to emerge ${P} again."
+               die "Kernel without CONFIG_NETFILTER detected!"
+       fi
+
+        if ! (linux_chkconfig_present IP_NF_TARGET_REDIRECT); then
+               eerror "${P} requires CONFIG_IP_NF_TARGET_REDIRECT support to be enabled in kernel!"
+               eerror "Recompile your kernel with netfilter REDIRECT target support enabled."
+               eerror
+               eerror "Reboot will be required if compiled directly into kernel."
+               eerror "If reboot is not desired you should choose a module instead and run"
+               eerror "make modules && make modules_install"
+               die "Kernel without CONFIG_IP_NF_TARGET_REDIRECT detected!"
+        fi
+
        enewgroup xmail
        enewuser xmail -1 /bin/false /dev/null xmail
 }