View | Details | Raw Unified | Return to bug 227218 | Differences between
and this patch

Collapse All | Expand All

(-)databases/mongodb32/Makefile (+9 lines)
Lines 50-55 GROUPS= mongodb Link Here
50
50
51
USE_RC_SUBR=	mongod
51
USE_RC_SUBR=	mongod
52
52
53
.include <bsd.port.options.mk>
54
55
.if ${OPSYS} != FreeBSD || ${OSVERSION} < 1101515 || \
56
	${OSVERSION} >= 1200000 && ${OSVERSION} < 1200057
57
SUB_LIST+=	LEGACY_LIMITS="" MODERN_LIMITS="@comment "
58
.else
59
SUB_LIST+=	LEGACY_LIMITS="@comment " MODERN_LIMITS=""
60
.endif
61
53
ALL_TARGET=	core
62
ALL_TARGET=	core
54
TEST_TARGET=	unittests
63
TEST_TARGET=	unittests
55
64
(-)databases/mongodb32/files/mongod.in (-10 / +11 lines)
Lines 7-17 Link Here
7
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
7
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
8
# to enable this service:
8
# to enable this service:
9
#
9
#
10
# mongod_enable (bool):  Set to "NO" by default.                                                                                                                                                                                             
10
# mongod_enable (bool):  Set to "NO" by default.
11
#                        Set it to "YES" to enable mongod.
11
#                        Set it to "YES" to enable mongod.
12
# mongod_limits (bool):  Set to "NO" by default.
12
%%LEGACY_LIMITS%%# mongod_limits (bool):  Set to "NO" by default.
13
#                        Set it to yes to run `limits -e -U mongodb`
13
%%LEGACY_LIMITS%%#                        Set it to yes to run `limits -e -U mongodb`
14
#                        just before mongod starts.
14
%%LEGACY_LIMITS%%#                        just before mongod starts.
15
# mongod_dbpath (str):   Default to "/var/db/mongodb"
15
# mongod_dbpath (str):   Default to "/var/db/mongodb"
16
#                        Base database directory.
16
#                        Base database directory.
17
# mongod_flags (str):    Custom additional arguments to be passed to mongod.
17
# mongod_flags (str):    Custom additional arguments to be passed to mongod.
Lines 28-34 rcvar=mongod_enable Link Here
28
load_rc_config $name
28
load_rc_config $name
29
29
30
: ${mongod_enable="NO"}
30
: ${mongod_enable="NO"}
31
: ${mongod_limits="NO"}
31
%%LEGACY_LIMITS%%: ${mongod_limits="NO"}
32
: ${mongod_dbpath="/var/db/mongodb"}
32
: ${mongod_dbpath="/var/db/mongodb"}
33
: ${mongod_flags="--logpath ${mongod_dbpath}/mongod.log --logappend"}
33
: ${mongod_flags="--logpath ${mongod_dbpath}/mongod.log --logappend"}
34
: ${mongod_user="mongodb"}
34
: ${mongod_user="mongodb"}
Lines 52-62 mongod_prestart() Link Here
52
        if [ ! -d ${mongod_dbpath} ]; then
52
        if [ ! -d ${mongod_dbpath} ]; then
53
                mongod_create_dbpath || return 1
53
                mongod_create_dbpath || return 1
54
        fi
54
        fi
55
        if checkyesno mongod_limits; then
55
%%LEGACY_LIMITS%%        if checkyesno mongod_limits; then
56
                eval `/usr/bin/limits -e -U ${mongod_user}` 2>/dev/null
56
%%LEGACY_LIMITS%%                eval `/usr/bin/limits -e -U ${mongod_user}` 2>/dev/null
57
        else
57
%%LEGACY_LIMITS%%        else
58
                return 0
58
%%LEGACY_LIMITS%%                return 0
59
        fi
59
%%LEGACY_LIMITS%%        fi
60
%%MODERN_LIMITS%%        return 0
60
}
61
}
61
62
62
run_rc_command "$1"
63
run_rc_command "$1"

Return to bug 227218