diff options
author | jnemeth <jnemeth@pkgsrc.org> | 2008-07-10 00:54:30 +0000 |
---|---|---|
committer | jnemeth <jnemeth@pkgsrc.org> | 2008-07-10 00:54:30 +0000 |
commit | 12137ba67b81cdda6d765d2a1aefde96acb73ac6 (patch) | |
tree | 5d79f9f8f545cf06aad9981450055f11047a4486 /mail/dovecot | |
parent | f3042ff0a1a3704862c5dc3dc62d5a820bb4e27f (diff) | |
download | pkgsrc-12137ba67b81cdda6d765d2a1aefde96acb73ac6.tar.gz |
bump default file descriptor limit as it is too low on NetBSD
Diffstat (limited to 'mail/dovecot')
-rw-r--r-- | mail/dovecot/Makefile | 3 | ||||
-rwxr-xr-x | mail/dovecot/files/dovecot.sh | 16 |
2 files changed, 17 insertions, 2 deletions
diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile index dc206b324e3..7894c6b13a9 100644 --- a/mail/dovecot/Makefile +++ b/mail/dovecot/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.117 2008/06/22 17:41:23 ghen Exp $ +# $NetBSD: Makefile,v 1.118 2008/07/10 00:54:30 jnemeth Exp $ DISTNAME= dovecot-1.1.1 +PKGREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.dovecot.org/releases/1.1/ diff --git a/mail/dovecot/files/dovecot.sh b/mail/dovecot/files/dovecot.sh index 0fdb7f8ad0a..8c80b85a931 100755 --- a/mail/dovecot/files/dovecot.sh +++ b/mail/dovecot/files/dovecot.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: dovecot.sh,v 1.3 2008/06/22 17:41:23 ghen Exp $ +# $NetBSD: dovecot.sh,v 1.4 2008/07/10 00:54:30 jnemeth Exp $ # # PROVIDE: dovecot @@ -14,5 +14,19 @@ command="@PREFIX@/sbin/${name}" required_files="@PKG_SYSCONFDIR@/$name.conf" extra_commands="reload" +dovecot_fdlimit=${dovecot_fdlimit-"768"} + +# A default limit of 64 (at least on NetBSD) may be too low for many people +SOFT_FDLIMIT=`ulimit -S -n` +HARD_FDLIMIT=`ulimit -H -n` + +if [ ${dovecot_fdlimit} -gt ${SOFT_FDLIMIT} ]; then + if [ ${dovecot_fdlimit} -le ${HARD_FDLIMIT} ]; then + ulimit -S -n ${dovecot_fdlimit} + else + ulimit -S -n ${HARD_FDLIMIT} + fi +fi + load_rc_config $name run_rc_command "$1" |