View | Details | Raw Unified | Return to bug 54352
Collapse All | Expand All

(-)freeradius/Makefile (-1 / +9 lines)
Lines 18-23 Link Here
18
18
19
LOGDIR?=	/var/log
19
LOGDIR?=	/var/log
20
20
21
USE_RC_SUBR=	yes
21
USE_GMAKE=	yes
22
USE_GMAKE=	yes
22
USE_LIBTOOL=	yes
23
USE_LIBTOOL=	yes
23
CONFIGURE_ARGS=	--prefix=${PREFIX} --quiet --with-logdir=${LOGDIR} \
24
CONFIGURE_ARGS=	--prefix=${PREFIX} --quiet --with-logdir=${LOGDIR} \
Lines 79-89 Link Here
79
	       	postgresql.conf  preproxy_users proxy.conf radiusd.conf \
80
	       	postgresql.conf  preproxy_users proxy.conf radiusd.conf \
80
	       	realms snmp.conf sql.conf users x99.conf x99passwd.sample
81
	       	realms snmp.conf sql.conf users x99.conf x99passwd.sample
81
82
83
RC_SCRIPTS_SUB=	PREFIX=${PREFIX} \
84
		RC_SUBR=${RC_SUBR}
85
86
post-build:
87
	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
88
		${FILESDIR}/radiusd.sh >${WRKDIR}/radiusd.sh
89
82
post-install:
90
post-install:
83
	@${MKDIR} ${PREFIX}/etc/raddb
91
	@${MKDIR} ${PREFIX}/etc/raddb
84
.for db in ${RADDB}
92
.for db in ${RADDB}
85
	${INSTALL_DATA} ${WRKSRC}/raddb/${db} ${PREFIX}/etc/raddb/${db}.sample
93
	${INSTALL_DATA} ${WRKSRC}/raddb/${db} ${PREFIX}/etc/raddb/${db}.sample
86
.endfor
94
.endfor
87
	${INSTALL_SCRIPT} ${FILESDIR}/radiusd.sh ${PREFIX}/etc/rc.d/radiusd.sh
95
	${INSTALL_SCRIPT} ${WRKDIR}/radiusd.sh ${PREFIX}/etc/rc.d/radiusd.sh
88
96
89
.include <bsd.port.mk>
97
.include <bsd.port.mk>
(-)freeradius/files/radiusd.sh (-36 / +33 lines)
Lines 1-38 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
# PROVIDE: radiusd
7
# REQUIRE: LOGIN
8
# KEYWORD: FreeBSD shutdown
9
#
10
# NOTE for FreeBSD 5.0+:
11
# If you want this script to start with the base rc scripts copy
12
# radiusd.sh to /etc/rc.d/radiusd
13
14
prefix=%%PREFIX%%
15
16
# Define the following radiusd_* variables in one of the following:
17
#       /etc/rc.conf
18
#       /etc/rc.conf.local
19
#       /etc/rc.conf.d/radiusd
20
#
21
# DO NOT CHANGE THESE DEFAULT VALUES HERE
22
#
23
radiusd_enable="no"				# Enable radiusd (yes/no)
24
#radiusd_program="${prefix}/sbin/radiusd"	# Path to radiusd program
25
#radiusd_flags="-xxyzsf -l stdout"		# Additional arguments to radiusd
26
27
. %%RC_SUBR%%
28
29
name="radiusd"
30
rcvar=${name}
31
command="${prefix}/sbin/${name}"
32
pidfile="/var/run/radiusd/${name}.pid"
2
33
3
# RADIUSD_FLAGS='-xxyzsf -l stdout'
34
load_rc_config $name
4
RADIUSD_FLAGS=
35
run_rc_command "$1"
5
6
if [ -r /etc/defaults/rc.conf ]; then
7
	. /etc/defaults/rc.conf
8
	source_rc_confs
9
elif [ -r /etc/rc.conf ]; then
10
	. /etc/rc.conf
11
fi
12
13
prog=$(realpath $0) || exit 1
14
dir=${prog%/*}
15
PREFIX=${dir%/etc/rc.d}
16
17
if [ ."$dir" = ."$prog" -o ."$PREFIX" = ."$dir" ]
18
then
19
	echo "$0: Cannot determine the PREFIX" >&2
20
	exit 1
21
fi
22
23
case $1 in
24
start)
25
	"$PREFIX"/sbin/radiusd $RADIUSD_FLAGS && echo -n " radiusd"
26
	;;
27
stop)
28
	if [ -f /var/run/radiusd/radiusd.pid ]; then
29
		kill `cat /var/run/radiusd/radiusd.pid` && echo -n ' radiusd'
30
	fi
31
	;;
32
*)
33
	echo "Usage: `basename $0` {start|stop}" >&2
34
	exit 64
35
	;;
36
esac
37
38
exit 0
(-)openldap12/Makefile (-3 / +11 lines)
Lines 30-35 Link Here
30
COMMENT=	Open source LDAP client and server software
30
COMMENT=	Open source LDAP client and server software
31
31
32
USE_LIBTOOL=	yes
32
USE_LIBTOOL=	yes
33
USE_RC_SUBR=	yes
33
34
34
CONFIGURE_ARGS=	--localstatedir=/var/db \
35
CONFIGURE_ARGS=	--localstatedir=/var/db \
35
		--enable-shared \
36
		--enable-shared \
Lines 76-81 Link Here
76
		sbin/ldif2index \
77
		sbin/ldif2index \
77
		sbin/ldif2ldbm
78
		sbin/ldif2ldbm
78
79
80
RC_SCRIPTS_SUB=	PREFIX=${PREFIX} \
81
		RC_SUBR=${RC_SUBR}
82
79
.include <bsd.port.pre.mk>
83
.include <bsd.port.pre.mk>
80
.include "${FILESDIR}/manpages"
84
.include "${FILESDIR}/manpages"
81
85
Lines 83-94 Link Here
83
	cd ${WRKSRC} ; ${MAKE} depend
87
	cd ${WRKSRC} ; ${MAKE} depend
84
88
85
post-build:
89
post-build:
86
	${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
90
.for script in slapd.sh slurpd.sh
91
	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
92
		${FILESDIR}/${script} >${WRKDIR}/${script}
93
.endfor
87
94
88
post-install:
95
post-install:
89
.for f in ${BINS}
96
.for f in ${BINS}
90
	strip ${PREFIX}/${f}
97
	strip ${PREFIX}/${f}
91
.endfor
98
.endfor
92
	${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
99
.for script in slapd.sh slurpd.sh
93
100
	${INSTALL_SCRIPT} ${WRKDIR}/${script} ${PREFIX}/etc/rc.d/${script}
101
.endfor
94
.include <bsd.port.post.mk>
102
.include <bsd.port.post.mk>
(-)openldap12/pkg-plist (-1 / +2 lines)
Lines 27-33 Link Here
27
etc/openldap/slapd.oc.conf.default
27
etc/openldap/slapd.oc.conf.default
28
@exec [ ! -f %B/slapd.oc.conf ] && cp %B/%f %B/slapd.oc.conf
28
@exec [ ! -f %B/slapd.oc.conf ] && cp %B/%f %B/slapd.oc.conf
29
@dirrm etc/openldap
29
@dirrm etc/openldap
30
etc/rc.d/slapd.sh.sample
30
etc/rc.d/slapd.sh
31
etc/rc.d/slurpd.sh
31
include/disptmpl.h
32
include/disptmpl.h
32
include/lber.h
33
include/lber.h
33
include/ldap.h
34
include/ldap.h
(-)openldap12/files/slapd.sh (-25 / +41 lines)
Lines 1-31 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $FreeBSD: ports/net/openldap12/files/slapd.sh,v 1.1 2000/09/25 05:43:46 knu Exp $
3
# $FreeBSD: ports/net/openldap12/files/slapd.sh,v 1.1 2000/09/25 05:43:46 knu Exp $
4
#
4
5
5
slapd=@@PREFIX@@/libexec/slapd
6
# PROVIDE: slapd
6
pidfile=/var/run/slapd.pid
7
# REQUIRE: DAEMON
8
# KEYWORD: FreeBSD shutdown
9
#
10
# NOTE for FreeBSD 5.0+:
11
# If you want this script to start with the base rc scripts copy
12
# slapd.sh.sample to /etc/rc.d/slapd, otherwise copy it to slapd.sh
7
13
8
case "$1" in
14
prefix=%%PREFIX%%
9
start)
10
    if [ -x $slapd ]; then
11
	echo -n ' slapd'
12
	$slapd
13
    fi
14
    ;;
15
stop)
16
    if [ -f $pidfile ]; then
17
	kill `cat $pidfile`
18
	telnet localhost ldap </dev/null >/dev/null 2>&1
19
	echo -n ' slapd'
20
	rm $pidfile
21
    else
22
	echo ' slapd: not running'
23
    fi
24
    ;;
25
*)
26
    echo "Usage: `basename $0` {start|stop}" >&2
27
    exit 64
28
    ;;
29
esac
30
15
31
exit 0
16
# Define the following slapd_* variables in one of the following:
17
#	/etc/rc.conf
18
#	/etc/rc.conf.local
19
#	/etc/rc.conf.d/slapd
20
#
21
# DO NOT CHANGE THESE DEFAULT VALUES HERE
22
#
23
slapd_enable="no"				# Enable slapd (yes/no)
24
#slapd_program="${prefix}/libexec/slapd"	# Path to slapd program
25
slapd_flags="-u ldap -g ldap" 			# Additional arguments to slapd
26
#
27
# IPv4 Only
28
#slapd_flags='-u ldap -g ldap -h ldap://0.0.0.0'
29
#
30
# IPv6 and IPv4
31
#slapd_flags='-u ldap -g ldap -h "ldap://[::] ldap://0.0.0.0"'
32
#
33
# IPv6 Only
34
#slapd_flags='-u ldap -g ldap -h ldap://[::]'
35
#
36
#
37
38
. %%RC_SUBR%%
39
40
name="slapd"
41
rcvar=`set_rcvar`
42
command="${prefix}/libexec/slapd"
43
pidfile=/var/run/ldap/slapd.pid
44
required_files="${prefix}/etc/openldap/slapd.conf ${prefix}/etc/openldap/ldap.conf"
45
46
load_rc_config $name
47
run_rc_command "$1"
(-)openldap12/files/slurpd.sh (+37 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
# PROVIDE: slurpd
7
# REQUIRE: DAEMON
8
# KEYWORD: FreeBSD shutdown
9
#
10
# NOTE for FreeBSD 5.0+:
11
# If you want this script to start with the base rc scripts copy
12
# slurpd.sh to /etc/rc.d/slurpd
13
14
prefix=%%PREFIX%%
15
16
# Define the following slurpd_* variables in one of the following:
17
#	/etc/rc.conf
18
#	/etc/rc.conf.local
19
#	/etc/rc.conf.d/slurpd
20
#
21
# DO NOT CHANGE THESE DEFAULT VALUES HERE
22
#
23
slurpd_enable="no"				# Enable slurpd (yes/no)
24
#slurpd_program="${prefix}/libexec/slapd"	# Path to slurpd program
25
#slurpd_flags="" 			# Additional arguments to slurpd
26
27
. %%RC_SUBR%%
28
29
name="slurpd"
30
rcvar=`set_rcvar`
31
command="${prefix}/libexec/slurpd"
32
command_args="&"
33
pidfile=/var/run/ldap/slurpd.pid
34
required_files="${prefix}/etc/openldap/slapd.conf ${prefix}/etc/openldap/ldap.conf"
35
36
load_rc_config $name
37
run_rc_command "$1"
(-)openldap20/Makefile (-5 / +12 lines)
Lines 46-51 Link Here
46
GNU_CONFIGURE=	yes
46
GNU_CONFIGURE=	yes
47
USE_OPENSSL=	yes
47
USE_OPENSSL=	yes
48
USE_REINPLACE=	yes
48
USE_REINPLACE=	yes
49
USE_RC_SUBR=	yes
49
CONFIGURE_TARGET=
50
CONFIGURE_TARGET=
50
51
51
LATEST_LINK=	openldap2
52
LATEST_LINK=	openldap2
Lines 111-116 Link Here
111
		libexec/slapd \
112
		libexec/slapd \
112
		libexec/slurpd
113
		libexec/slurpd
113
114
115
RC_SCRIPTS_SUB=	PREFIX=${PREFIX} \
116
		RC_SUBR=${RC_SUBR} \
117
		LDAP_RUN_DIR=${LDAP_RUN_DIR}
118
114
.include <bsd.port.pre.mk>
119
.include <bsd.port.pre.mk>
115
.include "${FILESDIR}/manpages"
120
.include "${FILESDIR}/manpages"
116
121
Lines 131-146 Link Here
131
post-build:
136
post-build:
132
	@${REINPLACE_CMD} -e 's,${LOCALSTATEDIR}/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
137
	@${REINPLACE_CMD} -e 's,${LOCALSTATEDIR}/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
133
		${WRKSRC}/servers/slapd/slapd.conf.tmp
138
		${WRKSRC}/servers/slapd/slapd.conf.tmp
134
	@${SED} -e 's,@@PREFIX@@,${PREFIX},g' -e 's,@@LDAP_RUN_DIR@@,${LDAP_RUN_DIR},g' \
139
.for script in slapd.sh slurpd.sh
135
		${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh.sample
140
	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
136
	@${SED} -e 's,@@PREFIX@@,${PREFIX},g' -e 's,@@LDAP_RUN_DIR@@,${LDAP_RUN_DIR},g' \
141
		${FILESDIR}/${script} >${WRKDIR}/${script}
137
		${FILESDIR}/slurpd.sh >${WRKDIR}/slurpd.sh.sample
142
.endfor
138
143
139
post-install:
144
post-install:
140
.for f in ${BINS}
145
.for f in ${BINS}
141
	@strip ${PREFIX}/${f}
146
	@strip ${PREFIX}/${f}
142
.endfor
147
.endfor
143
	@${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh.sample ${WRKDIR}/slurpd.sh.sample ${PREFIX}/etc/rc.d
148
.for script in slapd.sh slurpd.sh
149
	${INSTALL_SCRIPT} ${WRKDIR}/${script} ${PREFIX}/etc/rc.d/${script}
150
.endfor
144
	@${CAT} ${PKGMESSAGE}
151
	@${CAT} ${PKGMESSAGE}
145
152
146
.include <bsd.port.post.mk>
153
.include <bsd.port.post.mk>
(-)openldap20/pkg-plist (-2 / +2 lines)
Lines 51-58 Link Here
51
@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
51
@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
52
@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-ldbm 2>/dev/null || true
52
@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-ldbm 2>/dev/null || true
53
@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
53
@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
54
etc/rc.d/slapd.sh.sample
54
etc/rc.d/slapd.sh
55
etc/rc.d/slurpd.sh.sample
55
etc/rc.d/slurpd.sh
56
include/disptmpl.h
56
include/disptmpl.h
57
include/lber.h
57
include/lber.h
58
include/lber_types.h
58
include/lber_types.h
(-)openldap20/files/slapd.sh (-32 / +32 lines)
Lines 1-49 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $FreeBSD: ports/net/openldap20/files/slapd.sh,v 1.5 2003/07/07 11:51:31 oliver Exp $
3
# $FreeBSD: ports/net/openldap20/files/slapd.sh,v 1.5 2003/07/07 11:51:31 oliver Exp $
4
#
4
5
5
slapd_program=@@PREFIX@@/libexec/slapd
6
# PROVIDE: slapd
6
7
# REQUIRE: DAEMON
7
# Uncomment one of the following:
8
# KEYWORD: FreeBSD shutdown
9
#
10
# NOTE for FreeBSD 5.0+:
11
# If you want this script to start with the base rc scripts copy
12
# slapd.sh.sample to /etc/rc.d/slapd, otherwise copy it to slapd.sh
13
14
prefix=%%PREFIX%%
15
16
# Define the following slapd_* variables in one of the following:
17
#	/etc/rc.conf
18
#	/etc/rc.conf.local
19
#	/etc/rc.conf.d/slapd
20
#
21
# DO NOT CHANGE THESE DEFAULT VALUES HERE
22
#
23
slapd_enable="no"				# Enable slapd (yes/no)
24
#slapd_program="${prefix}/libexec/slapd"	# Path to slapd program
25
slapd_flags="-u ldap -g ldap" 			# Additional arguments to slapd
8
#
26
#
9
# IPv4 Only
27
# IPv4 Only
10
#slapd_args='-h ldap://0.0.0.0'
28
#slapd_flags='-u ldap -g ldap -h ldap://0.0.0.0'
11
#
29
#
12
# IPv6 and IPv4
30
# IPv6 and IPv4
13
#slapd_ags='-h "ldap://[::] ldap://0.0.0.0"'
31
#slapd_flags='-u ldap -g ldap -h "ldap://[::] ldap://0.0.0.0"'
14
#
32
#
15
# IPv6 Only
33
# IPv6 Only
16
#slapd_args='-h ldap://[::]'
34
#slapd_flags='-u ldap -g ldap -h ldap://[::]'
17
#
35
#
18
# Add '-u ldap -g ldap' when you do not want to run
36
# Add '-u ldap -g ldap' when you do not want to run
19
# slapd as root
37
# slapd as root
20
#
38
#
21
slapd_args=
22
39
23
pidfile=@@LDAP_RUN_DIR@@/slapd.pid
40
. %%RC_SUBR%%
24
41
25
case "$1" in
42
name="slapd"
26
start)
43
rcvar=`set_rcvar`
27
    if [ -x ${slapd_program} ]; then
44
command="${prefix}/libexec/slapd"
28
	echo -n ' slapd'
45
pidfile=%%LDAP_RUN_DIR%%/slapd.pid
29
	eval ${slapd_program} ${slapd_args}
46
required_files="${prefix}/etc/openldap/slapd.conf ${prefix}/etc/openldap/ldap.conf"
30
31
    fi
32
    ;;
33
stop)
34
    if [ -f $pidfile ]; then
35
	kill `cat $pidfile`
36
	telnet localhost ldap </dev/null >/dev/null 2>&1
37
	echo -n ' slapd'
38
	rm $pidfile
39
    else
40
	echo ' slapd: not running'
41
    fi
42
    ;;
43
*)
44
    echo "Usage: `basename $0` {start|stop}" >&2
45
    exit 64
46
    ;;
47
esac
48
47
49
exit 0
48
load_rc_config $name
49
run_rc_command "$1"
(-)openldap20/files/slurpd.sh (-20 / +30 lines)
Lines 1-27 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $FreeBSD: ports/net/openldap20/files/slurpd.sh,v 1.1 2003/07/07 11:51:31 oliver Exp $
3
# $FreeBSD: ports/net/openldap20/files/slurpd.sh,v 1.1 2003/07/07 11:51:31 oliver Exp $
4
#
4
5
5
slurpd_program=@@PREFIX@@/libexec/slurpd
6
# PROVIDE: slurpd
7
# REQUIRE: DAEMON
8
# KEYWORD: FreeBSD shutdown
9
#
10
# NOTE for FreeBSD 5.0+:
11
# If you want this script to start with the base rc scripts copy
12
# slurpd.sh to /etc/rc.d/slurpd
6
13
7
slurpd_args=
14
prefix=%%PREFIX%%
8
15
9
case "$1" in
16
# Define the following slurpd_* variables in one of the following:
10
start)
17
#	/etc/rc.conf
11
    if [ -x ${slurpd_program} ]; then
18
#	/etc/rc.conf.local
12
	echo -n ' slurpd'
19
#	/etc/rc.conf.d/slurpd
13
	${slurpd_program} ${slurpd_args} 
20
#
14
    fi
21
# DO NOT CHANGE THESE DEFAULT VALUES HERE
15
    ;;
22
#
16
stop)
23
slurpd_enable="no"				# Enable slurpd (yes/no)
17
    if ! killall `basename ${slurpd_program}`; then
24
#slurpd_program="${prefix}/libexec/slapd"	# Path to slurpd program
18
        echo ' slurpd: not running'
25
#slurpd_flags="" 			# Additional arguments to slurpd
19
    fi
20
    ;;
21
*)
22
    echo "Usage: `basename $0` {start|stop}" >&2
23
    exit 64
24
    ;;
25
esac
26
26
27
exit 0
27
. %%RC_SUBR%%
28
29
name="slurpd"
30
rcvar=`set_rcvar`
31
command="${prefix}/libexec/slurpd"
32
command_args="&"
33
pidfile=%%LDAP_RUN_DIR%%/slurpd.pid
34
required_files="${prefix}/etc/openldap/slapd.conf ${prefix}/etc/openldap/ldap.conf"
35
36
load_rc_config $name
37
run_rc_command "$1"
(-)openldap21/Makefile (-4 / +14 lines)
Lines 311-316 Link Here
311
PLIST_SUB+=	NO_SERVERS="@comment "
311
PLIST_SUB+=	NO_SERVERS="@comment "
312
.endif
312
.endif
313
313
314
.if !defined(CLIENT_ONLY)
315
USE_RC_SUBR=	YES
316
317
RC_SCRIPTS_SUB=	PREFIX=${PREFIX} \  
318
		RC_SUBR=${RC_SUBR}
319
.endif
320
314
post-patch:
321
post-patch:
315
	@${CP} ${WRKSRC}/servers/slapd/slapd.conf \
322
	@${CP} ${WRKSRC}/servers/slapd/slapd.conf \
316
		${WRKSRC}/servers/slapd/slapd.conf.Dist
323
		${WRKSRC}/servers/slapd/slapd.conf.Dist
Lines 321-328 Link Here
321
328
322
post-build:
329
post-build:
323
.if !defined(CLIENT_ONLY)
330
.if !defined(CLIENT_ONLY)
324
	@${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
331
.for script in slapd.sh slurpd.sh
325
	@${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slurpd.sh >${WRKDIR}/slurpd.sh
332
	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
333
		${FILESDIR}/${script} >${WRKDIR}/${script}
334
.endfor
326
.endif
335
.endif
327
336
328
do-install:
337
do-install:
Lines 341-348 Link Here
341
350
342
post-install:
351
post-install:
343
.if !defined(CLIENT_ONLY)
352
.if !defined(CLIENT_ONLY)
344
	@${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
353
.for script in slapd.sh slurpd.sh
345
	@${INSTALL_SCRIPT} ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d/slurpd.sh.sample
354
	@${INSTALL_SCRIPT} ${WRKDIR}/${script} ${PREFIX}/etc/rc.d/${script}
355
.endfor
346
.endif
356
.endif
347
357
348
.include <bsd.port.post.mk>
358
.include <bsd.port.post.mk>
(-)openldap21/pkg-plist (-2 / +2 lines)
Lines 47-53 Link Here
47
@comment -----------------------------------------
47
@comment -----------------------------------------
48
@comment BUILD_SLURPD
48
@comment BUILD_SLURPD
49
@comment -----------------------------------------
49
@comment -----------------------------------------
50
%%NO_SERVERS%%etc/rc.d/slurpd.sh.sample
50
%%NO_SERVERS%%etc/rc.d/slurpd.sh
51
%%NO_SERVERS%%libexec/slurpd
51
%%NO_SERVERS%%libexec/slurpd
52
%%NO_SERVERS%%@exec [ -d /var/db/openldap-slurp ] || /bin/mkdir /var/db/openldap-slurp
52
%%NO_SERVERS%%@exec [ -d /var/db/openldap-slurp ] || /bin/mkdir /var/db/openldap-slurp
53
%%NO_SERVERS%%@unexec /bin/rmdir /var/db/openldap-slurp 2>/dev/null || true
53
%%NO_SERVERS%%@unexec /bin/rmdir /var/db/openldap-slurp 2>/dev/null || true
Lines 55-61 Link Here
55
@comment -----------------------------------------
55
@comment -----------------------------------------
56
@comment BUILD_SLAPD
56
@comment BUILD_SLAPD
57
@comment -----------------------------------------
57
@comment -----------------------------------------
58
%%NO_SERVERS%%etc/rc.d/slapd.sh.sample
58
%%NO_SERVERS%%etc/rc.d/slapd.sh
59
%%NO_SERVERS%%libexec/slapd
59
%%NO_SERVERS%%libexec/slapd
60
%%NO_SERVERS%%sbin/slapadd
60
%%NO_SERVERS%%sbin/slapadd
61
%%NO_SERVERS%%sbin/slapcat
61
%%NO_SERVERS%%sbin/slapcat
(-)openldap21/files/slapd.sh (-30 / +30 lines)
Lines 2-46 Link Here
2
#
2
#
3
# $FreeBSD: ports/net/openldap21/files/slapd.sh,v 1.7 2003/05/23 00:21:04 edwin Exp $
3
# $FreeBSD: ports/net/openldap21/files/slapd.sh,v 1.7 2003/05/23 00:21:04 edwin Exp $
4
4
5
slapd_program=@@PREFIX@@/libexec/slapd
5
# PROVIDE: slapd
6
# REQUIRE: DAEMON
7
# KEYWORD: FreeBSD shutdown
8
#
9
# NOTE for FreeBSD 5.0+:
10
# If you want this script to start with the base rc scripts copy
11
# slapd.sh.sample to /etc/rc.d/slapd, otherwise copy it to slapd.sh
12
13
prefix=%%PREFIX%%
6
14
7
# Uncomment one of the following:
15
# Define the following slapd_* variables in one of the following:
16
#	/etc/rc.conf
17
#	/etc/rc.conf.local
18
#	/etc/rc.conf.d/slapd
19
#
20
# DO NOT CHANGE THESE DEFAULT VALUES HERE
21
#
22
slapd_enable="no"				# Enable slapd (yes/no)
23
#slapd_program="${prefix}/libexec/slapd"	# Path to slapd program
24
slapd_flags="-u ldap -g ldap" 			# Additional arguments to slapd
8
#
25
#
9
# IPv4 Only
26
# IPv4 Only
10
#slapd_args='-u ldap -g ldap -h ldap://0.0.0.0'
27
#slapd_flags='-u ldap -g ldap -h ldap://0.0.0.0'
11
#
28
#
12
# IPv6 and IPv4
29
# IPv6 and IPv4
13
#slapd_ags='-u ldap -g ldap -h "ldap://[::] ldap://0.0.0.0"'
30
#slapd_flags='-u ldap -g ldap -h "ldap://[::] ldap://0.0.0.0"'
14
#
31
#
15
# IPv6 Only
32
# IPv6 Only
16
#slapd_args='-u ldap -g ldap -h ldap://[::]'
33
#slapd_flags='-u ldap -g ldap -h ldap://[::]'
17
#
34
#
18
#
35
#
19
slapd_args="-u ldap -g ldap"
20
36
21
pidfile=/var/run/ldap/slapd.pid
37
. %%RC_SUBR%%
22
23
case "$1" in
24
start)
25
    if [ -x $slapd ]; then
26
	echo -n ' slapd'
27
	eval ${slapd_program} ${slapd_args}
28
38
29
    fi
39
name="slapd"
30
    ;;
40
rcvar=`set_rcvar`
31
stop)
41
command="${prefix}/libexec/slapd"
32
    if [ -f $pidfile ]; then
42
pidfile=/var/run/ldap/slapd.pid
33
	kill `cat $pidfile`
43
required_files="${prefix}/etc/openldap/slapd.conf ${prefix}/etc/openldap/ldap.conf"
34
	echo -n ' slapd'
35
	rm $pidfile
36
    else
37
	echo ' slapd: not running'
38
    fi
39
    ;;
40
*)
41
    echo "Usage: `basename $0` {start|stop}" >&2
42
    exit 64
43
    ;;
44
esac
45
44
46
exit 0
45
load_rc_config $name
46
run_rc_command "$1"
(-)openldap21/files/slurpd.sh (-27 / +30 lines)
Lines 3-34 Link Here
3
# $FreeBSD: ports/net/openldap21/files/slurpd.sh,v 1.2 2003/05/23 00:21:04 edwin Exp $
3
# $FreeBSD: ports/net/openldap21/files/slurpd.sh,v 1.2 2003/05/23 00:21:04 edwin Exp $
4
#
4
#
5
5
6
slurpd=@@PREFIX@@/libexec/slurpd
6
# PROVIDE: slurpd
7
pidfile=/var/run/ldap/slurpd.pid
7
# REQUIRE: DAEMON
8
# KEYWORD: FreeBSD shutdown
9
#
10
# NOTE for FreeBSD 5.0+:
11
# If you want this script to start with the base rc scripts copy
12
# slurpd.sh to /etc/rc.d/slurpd
13
14
prefix=%%PREFIX%%
15
16
# Define the following slurpd_* variables in one of the following:
17
#	/etc/rc.conf
18
#	/etc/rc.conf.local
19
#	/etc/rc.conf.d/slurpd
20
#
21
# DO NOT CHANGE THESE DEFAULT VALUES HERE
22
#
23
slurpd_enable="no"				# Enable slurpd (yes/no)
24
#slurpd_program="${prefix}/libexec/slapd"	# Path to slurpd program
25
#slurpd_flags="" 			# Additional arguments to slurpd
8
26
9
case "$1" in
27
. %%RC_SUBR%%
10
start)
28
11
	if [ -x $slurpd ]; then
29
name="slurpd"
12
		echo -n ' slurpd'
30
rcvar=`set_rcvar`
13
		$slurpd &
31
command="${prefix}/libexec/slurpd"
14
		echo $! > $pidfile
32
command_args="&"
15
	fi
33
pidfile=/var/run/ldap/slurpd.pid
16
	;;
34
required_files="${prefix}/etc/openldap/slapd.conf ${prefix}/etc/openldap/ldap.conf"
17
stop)
18
	pids=`ps xa | awk '/slurpd/{ print $1 }'`
19
	for pid in $pids; do
20
		kill $pid
21
		echo -n " slurpd($pid)"
22
	done
23
    	;;
24
restart)
25
	$0 stop
26
	$0 start
27
	;;
28
*)
29
	echo "Usage: `basename $0` {start|stop}" >&2
30
	exit 64
31
	;;
32
esac
33
35
34
exit 0
36
load_rc_config $name
37
run_rc_command "$1"
(-)openldap22/Makefile (+2 lines)
Lines 40-45 Link Here
40
USE_OPENSSL=		yes
40
USE_OPENSSL=		yes
41
USE_REINPLACE=		yes
41
USE_REINPLACE=		yes
42
USE_LIBTOOL_VER=	14
42
USE_LIBTOOL_VER=	14
43
USE_RC_SUBR=		yes
43
44
44
PLIST=			${WRKDIR}/pkg-plist
45
PLIST=			${WRKDIR}/pkg-plist
45
PKGINSTALL=		${WRKDIR}/pkg-install
46
PKGINSTALL=		${WRKDIR}/pkg-install
Lines 55-60 Link Here
55
			--with-tls=openssl
56
			--with-tls=openssl
56
57
57
SED_SCRIPT=		-e 's,%%PREFIX%%,${PREFIX},g' \
58
SED_SCRIPT=		-e 's,%%PREFIX%%,${PREFIX},g' \
59
			-e 's,%%RC_SUBR%%,${RC_SUBR},g' \
58
			-e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
60
			-e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
59
			-e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g'
61
			-e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g'
60
62
(-)openldap22/files/slapd.sh (-43 / +42 lines)
Lines 1-14 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $FreeBSD: ports/net/openldap22/files/slapd.sh,v 1.8 2003/07/02 14:49:57 kuriyama Exp $
3
# $FreeBSD: ports/net/openldap22/files/slapd.sh,v 1.8 2003/07/02 14:49:57 kuriyama Exp $
4
4
#
5
slapd_program=%%PREFIX%%/libexec/slapd
6
7
slapd_pidfile=%%LDAP_RUN_DIR%%/slapd.pid
8
9
slapd_enable="NO"
10
11
slapd_args=
12
5
13
# Add the following lines to /etc/rc.conf to enable slapd:
6
# Add the following lines to /etc/rc.conf to enable slapd:
14
#
7
#
Lines 21-59 Link Here
21
# if you want to run slapd as a non-privileged user (recommended)
14
# if you want to run slapd as a non-privileged user (recommended)
22
#
15
#
23
16
24
# Suck in the configuration variables.
17
# PROVIDE: slapd
25
if [ -r /etc/defaults/rc.conf ]; then
18
# REQUIRE: DAEMON
26
    . /etc/defaults/rc.conf
19
# KEYWORD: FreeBSD shutdown
27
    source_rc_confs
20
#
28
elif [ -r /etc/rc.conf ]; then
21
# NOTE for FreeBSD 5.0+:
29
    . /etc/rc.conf
22
# If you want this script to start with the base rc scripts copy
30
fi
23
# slapd.sh.sample to /etc/rc.d/slapd, otherwise copy it to slapd.sh
31
24
32
case "$slapd_enable" in
25
prefix=%%PREFIX%%
33
[Yy][Ee][Ss])
26
34
    case "$1" in
27
# Define the following slapd_* variables in one of the following:
35
    start)
28
#	/etc/rc.conf
36
        if [ -x ${slapd_program} ]; then
29
#	/etc/rc.conf.local
37
            echo -n ' slapd'
30
#	/etc/rc.conf.d/slapd
38
            eval ${slapd_program} ${slapd_args}
31
#
39
        fi
32
# DO NOT CHANGE THESE DEFAULT VALUES HERE
40
        ;;
33
#
41
    stop)
34
slapd_enable="no"				# Enable slapd (yes/no)
42
        if [ -f $slapd_pidfile ]; then
35
#slapd_program="${prefix}/libexec/slapd"	# Path to slapd program
43
            kill `cat $slapd_pidfile`
36
slapd_flags="-u ldap -g ldap" 			# Additional arguments to slapd
44
            echo -n ' slapd'
37
#
45
        else
38
# IPv4 Only
46
            echo ' slapd: not running'
39
#slapd_flags='-u ldap -g ldap -h ldap://0.0.0.0'
47
        fi
40
#
48
        ;;
41
# IPv6 and IPv4
49
    *)
42
#slapd_flags='-u ldap -g ldap -h "ldap://[::] ldap://0.0.0.0"'
50
        echo "Usage: `basename $0` {start|stop}" >&2
43
#
51
        exit 64
44
# IPv6 Only
52
        ;;
45
#slapd_flags='-u ldap -g ldap -h ldap://[::]'
53
    esac
46
#
54
    ;;
47
#
55
*)
48
56
    ;;
49
. %%RC_SUBR%%
57
esac
50
51
name="slapd"
52
rcvar=`set_rcvar`
53
command="${prefix}/libexec/slapd"
54
pidfile=%%LDAP_RUN_DIR%%/slapd.pid
55
required_files="${prefix}/etc/openldap/slapd.conf ${prefix}/etc/openldap/ldap.conf"
58
56
59
exit 0
57
load_rc_config $name
58
run_rc_command "$1"
(-)openldap22/files/slurpd.sh (-42 / +29 lines)
Lines 1-50 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $FreeBSD: ports/net/openldap22/files/slurpd.sh,v 1.3 2003/07/02 14:49:57 kuriyama Exp $
3
# $FreeBSD: ports/net/openldap22/files/slurpd.sh,v 1.3 2003/07/02 14:49:57 kuriyama Exp $
4
#
4
5
5
slurpd_program=%%PREFIX%%/libexec/slurpd
6
# PROVIDE: slurpd
6
7
# REQUIRE: DAEMON
7
slurpd_enable="NO"
8
# KEYWORD: FreeBSD shutdown
8
9
slurpd_args=
10
11
# Add the following line to /etc/rc.conf to enable slurpd:
12
#
9
#
13
#slurpd_enable="YES"
10
# NOTE for FreeBSD 5.0+:
11
# If you want this script to start with the base rc scripts copy
12
# slurpd.sh to /etc/rc.d/slurpd
13
14
prefix=%%PREFIX%%
15
16
# Define the following slurpd_* variables in one of the following:
17
#	/etc/rc.conf
18
#	/etc/rc.conf.local
19
#	/etc/rc.conf.d/slurpd
14
#
20
#
15
# See slurpd(8) for details
21
# DO NOT CHANGE THESE DEFAULT VALUES HERE
16
#
22
#
23
slurpd_enable="no"				# Enable slurpd (yes/no)
24
#slurpd_program="${prefix}/libexec/slapd"	# Path to slurpd program
25
#slurpd_flags="" 			# Additional arguments to slurpd
26
27
. %%RC_SUBR%%
28
29
name="slurpd"
30
rcvar=`set_rcvar`
31
command="${prefix}/libexec/slurpd"
32
command_args="&"
33
pidfile=%%LDAP_RUN_DIR%%/slurpd.pid
34
required_files="${prefix}/etc/openldap/slapd.conf ${prefix}/etc/openldap/ldap.conf"
17
35
18
# Suck in the configuration variables.
36
load_rc_config $name
19
if [ -r /etc/defaults/rc.conf ]; then
37
run_rc_command "$1"
20
    . /etc/defaults/rc.conf
21
    source_rc_confs
22
elif [ -r /etc/rc.conf ]; then
23
    . /etc/rc.conf
24
fi
25
26
case "$slurpd_enable" in
27
[Yy][Ee][Ss])
28
    case "$1" in
29
    start)
30
        if [ -x ${slurpd_program} ]; then
31
            echo -n ' slurpd'
32
            ${slurpd_program} ${slurpd_args} 
33
        fi
34
        ;;
35
    stop)
36
        if ! killall `basename ${slurpd_program}`; then
37
            echo ' slurpd: not running'
38
        fi
39
        ;;
40
    *)
41
        echo "Usage: `basename $0` {start|stop}" >&2
42
        exit 64
43
        ;;
44
    esac
45
    ;;
46
*)
47
    ;;
48
esac
49
50
exit 0
(-)radiusd-cistron/Makefile (-4 / +10 lines)
Lines 21-33 Link Here
21
MAKE_ENV+=	RADIUS_DIR="${RADIUS_DIR}"
21
MAKE_ENV+=	RADIUS_DIR="${RADIUS_DIR}"
22
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
22
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
23
23
24
USE_RC_SUBR=	YES
25
24
MAN1=		radclient.1 radlast.1 radtest.1 radwho.1 radzap.1
26
MAN1=		radclient.1 radlast.1 radtest.1 radwho.1 radzap.1
25
MAN5=		clients.5rad naslist.5rad
27
MAN5=		clients.5rad naslist.5rad
26
MAN8=		radiusd.8 radrelay.8 radwatch.8
28
MAN8=		radiusd.8 radrelay.8 radwatch.8
27
29
30
RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
31
                RC_SUBR=${RC_SUBR}
32
28
do-build:
33
do-build:
29
	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${MAKE} -f ${MAKEFILE}
34
	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${MAKE} -f ${MAKEFILE}
30
35
36
post-build:
37
	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
38
		${FILESDIR}/radiusd.sh.tmpl >${WRKDIR}/radiusd.sh
39
31
do-install:
40
do-install:
32
	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${MAKE} -f ${MAKEFILE} install
41
	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${MAKE} -f ${MAKEFILE} install
33
	@${MKDIR} -m 700 /var/log/radacct
42
	@${MKDIR} -m 700 /var/log/radacct
Lines 54-62 Link Here
54
	${INSTALL_MAN} ${WRKSRC}/doc/radwatch.8 ${MANPREFIX}/man/man8
63
	${INSTALL_MAN} ${WRKSRC}/doc/radwatch.8 ${MANPREFIX}/man/man8
55
64
56
post-install:
65
post-install:
57
	@${SED} -e "s=!!PREFIX!!=${PREFIX}=g" ${FILESDIR}/radiusd.sh.tmpl \
66
	$@{INSTALL_SCRIPT} ${WRKDIR}/radiusd.sh ${PREFIX}/etc/rc.d/radiusd.sh
58
		> ${PREFIX}/etc/rc.d/radiusd.sh
59
	@${CHMOD} 555 ${PREFIX}/etc/rc.d/radiusd.sh
60
	@${CHOWN} root:wheel ${PREFIX}/etc/rc.d/radiusd.sh
61
67
62
.include <bsd.port.mk>
68
.include <bsd.port.mk>
(-)radiusd-cistron/files/radiusd.sh.tmpl (-4 / +35 lines)
Lines 1-5 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
case "$1" in
2
#
3
stop) killall radiusd;;
3
# $FreeBSD$
4
*) [ -x !!PREFIX!!/sbin/radiusd ] && !!PREFIX!!/sbin/radiusd -y && echo -n ' radiusd';;
4
#
5
esac
5
6
# PROVIDE: radiusd
7
# REQUIRE: LOGIN
8
# KEYWORD: FreeBSD shutdown
9
#
10
# NOTE for FreeBSD 5.0+:
11
# If you want this script to start with the base rc scripts copy
12
# radiusd.sh to /etc/rc.d/radiusd
13
14
prefix=%%PREFIX%%
15
16
# Define the following radiusd_* variables in one of the following:
17
#       /etc/rc.conf
18
#       /etc/rc.conf.local
19
#       /etc/rc.conf.d/radiusd
20
#
21
# DO NOT CHANGE THESE DEFAULT VALUES HERE
22
#
23
radiusd_enable="no"				# Enable radiusd (yes/no)
24
#radiusd_program="${prefix}/sbin/radiusd"	# Path to radiusd program
25
#radiusd_flags=""				# Additional arguments to radiusd
26
27
. %%RC_SUBR%%
28
29
name="radiusd"
30
rcvar=${name}
31
command="${prefix}/sbin/${name}"
32
command_args="-y"
33
pidfile="/var/run/${name}.pid"
34
35
load_rc_config $name
36
run_rc_command "$1"
(-)samba/Makefile (-12 / +25 lines)
Lines 21-26 Link Here
21
USE_GMAKE=	YES
21
USE_GMAKE=	YES
22
USE_LIBTOOL=	YES
22
USE_LIBTOOL=	YES
23
USE_AUTOCONF=	YES
23
USE_AUTOCONF=	YES
24
USE_RC_SUBR=	YES
24
25
25
# directories
26
# directories
26
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
27
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
Lines 66-74 Link Here
66
SAMBA_VFSDIR?=	${PREFIX}/lib/samba
67
SAMBA_VFSDIR?=	${PREFIX}/lib/samba
67
68
68
# sample files
69
# sample files
69
STARTUP_SCRIPT=	${PREFIX}/etc/rc.d/samba.sh.sample
70
SAMPLE_CONFIG=	${SAMBA_CONFDIR}/smb.conf.default
70
SAMPLE_CONFIG=	${SAMBA_CONFDIR}/smb.conf.default
71
71
72
# Startup Scripts
73
SMBD_SCRIPT=	${PREFIX}/etc/rc.d/900smbd.sh
74
NMBD_SCRIPT=	${PREFIX}/etc/rc.d/901nmbd.sh
75
76
# Change to the following when rcorder is used on ${prefix}/etc/rc.d also.
77
# SMBD_SCRIPT=	${PREFIX}/etc/rc.d/smbd.sh
78
# NMBD_SCRIPT=	${PREFIX}/etc/rc.d/nmbd.sh
79
72
CONFIGURE_ARGS=	--libdir=${SAMBA_CONFDIR} \
80
CONFIGURE_ARGS=	--libdir=${SAMBA_CONFDIR} \
73
		--localstatedir=${VARDIR} --with-swatdir=${PREFIX}/share/swat \
81
		--localstatedir=${VARDIR} --with-swatdir=${PREFIX}/share/swat \
74
		--with-sambabook=${PREFIX}/share/swat/using_samba \
82
		--with-sambabook=${PREFIX}/share/swat/using_samba \
Lines 184-200 Link Here
184
		WINBIND_NSS=${WINBIND_NSS} \
192
		WINBIND_NSS=${WINBIND_NSS} \
185
		WINBIND_AUTH_CHALLENGE=${WINBIND_AUTH_CHALLENGE}
193
		WINBIND_AUTH_CHALLENGE=${WINBIND_AUTH_CHALLENGE}
186
194
187
.if defined(WITH_RECYCLE) || defined(WITH_AUDIT)
195
RC_SCRIPTS_SUB=	PREFIX=${PREFIX} \
188
post-build:
196
		RC_SUBR=${RC_SUBR} \
189
	cd ${WRKDIR}/${DISTNAME}/examples/VFS; \
197
		SAMBA_CONFDIR=${SAMBA_CONFDIR}
190
		./configure;${GMAKE}; \
191
		${RM} -f config.cache config.log config.status
192
.endif
193
198
194
pre-build:
199
pre-build:
195
	${RM} -fr ${WRKSRC}/include/proto.h
200
	${RM} -fr ${WRKSRC}/include/proto.h
196
	(cd ${WRKSRC} && make proto)
201
	(cd ${WRKSRC} && make proto)
197
202
203
post-build:
204
.if defined(WITH_RECYCLE) || defined(WITH_AUDIT)
205
	cd ${WRKDIR}/${DISTNAME}/examples/VFS; \
206
		LIBTOOL=${LIBTOOL} ./configure;${GMAKE}; \
207
		${RM} -f config.cache config.log config.status
208
.endif
209
.for script in nmbd.sh smbd.sh
210
	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
211
		${FILESDIR}/${script} > ${WRKDIR}/${script} 
212
.endfor
213
198
post-install:
214
post-install:
199
.if defined(WITH_WINBIND_NSS)
215
.if defined(WITH_WINBIND_NSS)
200
	${INSTALL_PROGRAM} ${WRKSRC}/nsswitch/libnss_winbind.so ${PREFIX}/lib/nss_winbind.so.1
216
	${INSTALL_PROGRAM} ${WRKSRC}/nsswitch/libnss_winbind.so ${PREFIX}/lib/nss_winbind.so.1
Lines 220-230 Link Here
220
		${RM} ${PREFIX}/share/examples/samba/VFS/$${file} ; \
236
		${RM} ${PREFIX}/share/examples/samba/VFS/$${file} ; \
221
	done
237
	done
222
.endif
238
.endif
223
	@if [ ! -f ${STARTUP_SCRIPT} ]; then				\
239
	${INSTALL_SCRIPT} ${WRKDIR}/smbd.sh ${SMBD_SCRIPT}
224
		${ECHO} "Installing ${STARTUP_SCRIPT} startup file." ;	\
240
	${INSTALL_SCRIPT} ${WRKDIR}/nmbd.sh ${NMBD_SCRIPT}
225
		${INSTALL_SCRIPT} ${FILESDIR}/samba.sh.sample 		\
226
			${STARTUP_SCRIPT} ;				\
227
	fi
228
	@test -d ${SAMBA_SPOOL} || ${MKDIR} ${SAMBA_SPOOL} && ${CHMOD} 1777 ${SAMBA_SPOOL}
241
	@test -d ${SAMBA_SPOOL} || ${MKDIR} ${SAMBA_SPOOL} && ${CHMOD} 1777 ${SAMBA_SPOOL}
229
	@if [ ! -f ${SAMPLE_CONFIG} ]; then				\
242
	@if [ ! -f ${SAMPLE_CONFIG} ]; then				\
230
		${SED} -e 's!%%SAMBA_SPOOL%%!${SAMBA_SPOOL}!'		\
243
		${SED} -e 's!%%SAMBA_SPOOL%%!${SAMBA_SPOOL}!'		\
(-)samba/pkg-plist (-1 / +2 lines)
Lines 55-61 Link Here
55
etc/codepages/unicode_map.ISO8859-7
55
etc/codepages/unicode_map.ISO8859-7
56
etc/codepages/unicode_map.ISO8859-9
56
etc/codepages/unicode_map.ISO8859-9
57
etc/codepages/unicode_map.KOI8-R
57
etc/codepages/unicode_map.KOI8-R
58
etc/rc.d/samba.sh.sample
58
etc/rc.d/900smbd.sh
59
etc/rc.d/901nmbd.sh
59
%%RECYCLE%%etc/recycle.conf.default
60
%%RECYCLE%%etc/recycle.conf.default
60
etc/smb.conf.default
61
etc/smb.conf.default
61
%%AUDIT%%lib/samba/audit.so
62
%%AUDIT%%lib/samba/audit.so
(-)samba/files/nmbd.sh (+37 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
# PROVIDE: nmbd
6
# REQUIRE: DAEMON smbd
7
#
8
# NOTE for FreeBSD 5.0+:
9
# If you want this script to start with the base rc scripts
10
# move nmbd.sh to /etc/rc.d/nmbd
11
12
Define these nmbd_* variables in one of these files:
13
#       /etc/rc.conf
14
#	/etc/rc.conf.local
15
#       /etc/rc.conf.d/nmbd
16
#
17
# DO NOT CHANGE THESE DEFAULT VALUES HERE
18
#
19
nmbd_enable="YES"			# Enable nmbd
20
#nmbd_program="${prefix}/sbin/nmbd"	# Location of nmbd
21
#nmbd_flags=""				# Flags to nmbd
22
23
prefix=%%PREFIX%%
24
25
. %%RC_SUBR%%
26
27
name="nmbd"
28
rcvar=`set_rcvar`
29
command="$(prefix)/sbin/${name}"
30
command_args="-D"	# _must_ start as daemon from rc.d;
31
			# add more flags through ${${name}_flags}
32
pidfile="/var/run/nmbd.pid"
33
required_files="%%SAMBA_CONFDIR%%/smb.conf"
34
extra_commands="reload"
35
36
load_rc_config $name
37
run_rc_command "$1"
(-)samba/files/samba.sh.sample (-31 lines)
Removed Link Here
1
#!/bin/sh
2
3
rc_file=${0##*/}
4
5
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${rc_file}\$"); then
6
        echo "${rc_file}: Cannot determine PREFIX." >&2
7
        echo "Please use the complete pathname." >&2
8
        exit 64
9
fi
10
11
smbspool=/var/spool/samba
12
pidfiledir=/var/run
13
smbd=${PREFIX}/sbin/smbd
14
nmbd=${PREFIX}/sbin/nmbd
15
16
# start
17
if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
18
	if [ -f $smbd ]; then
19
		if [ -d $smbspool ]; then
20
			rm -f $smbspool/*
21
		fi
22
		echo -n ' Samba'
23
		$smbd -D
24
		$nmbd -D
25
	fi
26
27
# stop
28
elif [ "x$1" = "xstop" ]; then
29
	kill `cat $pidfiledir/smbd.pid`
30
	kill `cat $pidfiledir/nmbd.pid`
31
fi
(-)samba/files/smbd.sh (+53 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
# PROVIDE: smbd
6
# BEFORE: nmbd
7
# REQUIRE: DAEMON
8
#
9
# NOTE for FreeBSD 5.0+:
10
# If you want this script to start with the base rc scripts
11
# move smbd.sh to /etc/rc.d/smbd
12
13
# Define these smbd_* variables in one of these files:
14
#       /etc/rc.conf
15
#	/etc/rc.conf.local
16
#       /etc/rc.conf.d/smbd
17
#
18
# DO NOT CHANGE THESE DEFAULT VALUES HERE
19
#
20
smbd_enable="YES"			# Enable smbd
21
#smbd_program="${prefix}/sbin/smbd"	# Location of smbd
22
#smbd_flags=""				# Flags to smbd program
23
#smbd_print_spooldir="/var/spool/samba"	# Location of Samba Print Spool
24
25
prefix=%%PREFIX%%
26
27
clear_print_spool()
28
{
29
	if [ -d $spooldir ]; then
30
		rm -f $spooldir/*
31
	fi
32
}
33
34
. %%RC_SUBR%%
35
36
name="smbd"
37
rcvar=`set_rcvar`
38
command="$(prefix)/sbin/${name}"
39
command_args="-D"	# _must_ start as daemon from rc.d;
40
			# add more flags through ${${name}_flags}
41
pidfile="/var/run/smbd.pid"
42
required_files="%%SAMBA_CONFDIR%%/smb.conf"
43
spooldir="/var/spool/samba"
44
extra_commands="reload"
45
start_precmd="clear_smbspool"
46
47
load_rc_config $name
48
49
if [ -n "$smbd_print_spooldir" ]; then
50
	spooldir=$smbd_print_spooldir
51
fi
52
53
run_rc_command "$1"
(-)samba-devel/Makefile (-6 / +28 lines)
Lines 17-22 Link Here
17
COMMENT=	A free SMB and CIFS client and server for UNIX
17
COMMENT=	A free SMB and CIFS client and server for UNIX
18
18
19
USE_BZIP2="YES"
19
USE_BZIP2="YES"
20
USE_RC_SUBR="YES"
20
21
21
.if !defined(WITHOUT_CUPS)
22
.if !defined(WITHOUT_CUPS)
22
WITH_CUPS=	yes
23
WITH_CUPS=	yes
Lines 34-43 Link Here
34
SAMBA_LOGDIR=	${VARDIR}/log
35
SAMBA_LOGDIR=	${VARDIR}/log
35
SAMBA_PRIVATE=	${PREFIX}/private
36
SAMBA_PRIVATE=	${PREFIX}/private
36
SAMBA_CONFDIR=	${PREFIX}/etc
37
SAMBA_CONFDIR=	${PREFIX}/etc
38
37
# sample files
39
# sample files
38
STARTUP_SCRIPT=	${PREFIX}/etc/rc.d/samba.sh.sample
39
SAMPLE_CONFIG=	${SAMBA_CONFDIR}/smb.conf.default
40
SAMPLE_CONFIG=	${SAMBA_CONFDIR}/smb.conf.default
40
DOCSDIR=	${PREFIX}/share/doc/samba
41
42
# Startup Scripts  
43
SMBD_SCRIPT=    ${PREFIX}/etc/rc.d/900smbd.sh
44
NMBD_SCRIPT=    ${PREFIX}/etc/rc.d/901nmbd.sh
45
46
# Change to the following when rcorder is used on ${prefix}/etc/rc.d also.
47
# SMBD_SCRIPT=  ${PREFIX}/etc/rc.d/smbd.sh
48
# NMBD_SCRIPT=  ${PREFIX}/etc/rc.d/nmbd.sh
41
49
42
NO_LATEST_LINK=	yes
50
NO_LATEST_LINK=	yes
43
USE_AUTOCONF=	yes
51
USE_AUTOCONF=	yes
Lines 100-113 Link Here
100
MAN8=		nmbd.8 smbd.8 smbmnt.8 smbmount.8 net.8 pdbedit.8 \
108
MAN8=		nmbd.8 smbd.8 smbmnt.8 smbmount.8 net.8 pdbedit.8 \
101
		smbpasswd.8 smbspool.8 smbumount.8 swat.8 winbindd.8
109
		smbpasswd.8 smbspool.8 smbumount.8 swat.8 winbindd.8
102
110
111
RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
112
		RC_SUBR=${RC_SUBR} \
113
		SAMBA_CONFDIR=${SAMBA_CONFDIR}
114
115
post-build:
116
.for script in nmbd.sh smbd.sh
117
	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
118
		${FILESDIR}/${script} > ${WRKDIR}/${script}
119
.endfor
120
103
post-install:
121
post-install:
104
	${MKDIR} ${PREFIX}/share/examples/samba
122
	${MKDIR} ${PREFIX}/share/examples/samba
105
	${CP} -rp ${WRKDIR}/${DISTNAME}/examples/* ${PREFIX}/share/examples/samba
123
	${CP} -rp ${WRKDIR}/${DISTNAME}/examples/* ${PREFIX}/share/examples/samba
106
	@if [ ! -f ${STARTUP_SCRIPT} ]; then				\
124
	@if [ ! -f ${SMBD_SCRIPT} ]; then				\
107
		${ECHO} "Installing ${STARTUP_SCRIPT} startup file." ;	\
125
		${ECHO} "Installing ${SMBD_SCRIPT} startup file." ;	\
108
		${INSTALL_SCRIPT} ${FILESDIR}/samba.sh.sample 		\
126
		${INSTALL_SCRIPT} ${WRKDIR}/smbd.sh ${SMBD_SCRIPT} ;	\
109
			${STARTUP_SCRIPT} ;				\
127
	fi
128
	@if [ ! -f ${NMBD_SCRIPT} ]; then 				\
129
		${ECHO} "Installing ${NMBD_SCRIPT} startup file." ;	\
130
		${INSTALL_SCRIPT} ${WRKDIR}/nmbd.sh ${NMBD_SCRIPT} ;	\
110
	fi
131
	fi
132
.endfor
111
	@test -d ${SAMBA_SPOOL} || ${MKDIR} ${SAMBA_SPOOL} && ${CHMOD} 1777 ${SAMBA_SPOOL}
133
	@test -d ${SAMBA_SPOOL} || ${MKDIR} ${SAMBA_SPOOL} && ${CHMOD} 1777 ${SAMBA_SPOOL}
112
	@if [ ! -f ${SAMPLE_CONFIG} ]; then				\
134
	@if [ ! -f ${SAMPLE_CONFIG} ]; then				\
113
		${SED} -e 's!%%SAMBA_SPOOL%%!${SAMBA_SPOOL}!'		\
135
		${SED} -e 's!%%SAMBA_SPOOL%%!${SAMBA_SPOOL}!'		\
(-)samba-devel/pkg-plist (-1 / +2 lines)
Lines 19-25 Link Here
19
bin/tdbbackup
19
bin/tdbbackup
20
bin/testparm
20
bin/testparm
21
bin/testprns
21
bin/testprns
22
etc/rc.d/samba.sh.sample
22
etc/rc.d/900smbd.sh
23
etc/rc.d/901nmbd.sh
23
etc/lowcase.dat
24
etc/lowcase.dat
24
etc/smb.conf.default
25
etc/smb.conf.default
25
etc/upcase.dat
26
etc/upcase.dat
(-)samba-devel/files/README.FreeBSD (-7 / +5 lines)
Lines 10-21 Link Here
10
10
11
FreeBSD Samba ports for localization and encrypt passwords support are no
11
FreeBSD Samba ports for localization and encrypt passwords support are no
12
longer provided because these supports have been integrated into the
12
longer provided because these supports have been integrated into the
13
original distribution since 1.9.18.  If you're Western European or Japanese
13
original distribution since 1.9.18.  If you're Western European, Japanese,
14
Windows users, please set "client code page" parameter in smb.conf (1.9.18
14
or Chinese Windows users, please set "client code page" parameter in smb.conf.
15
does not support Chinese Windows. If you want to use Chinese samba, please
15
See smb.conf.sample for details.  If you want to use NT4+SP3 or Win95+updates
16
use chinese/samba port).  See smb.conf.sample for details.  If you want to
16
clients, set "encrypt passwords" parameter to yes and use smbpasswd [username]
17
use NT4+SP3 or Win95+updates clients, set "encrypt passwords" parameter to
17
to use /usr/local/private/smbpasswd for authentication.
18
yes and use smbpasswd [username] to use /usr/local/private/smbpasswd for
19
authentication.
20
18
21
FreeBSD SAMBA ports maintainer: Tatsumi Hosokawa <hosokawa@jp.FreeBSD.org>
19
FreeBSD SAMBA ports maintainer: Tatsumi Hosokawa <hosokawa@jp.FreeBSD.org>
(-)samba-devel/files/nmbd.sh (+37 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
# PROVIDE: nmbd
6
# REQUIRE: DAEMON smbd
7
#
8
# NOTE for FreeBSD 5.0+:
9
# If you want this script to start with the base rc scripts
10
# move nmbd.sh to /etc/rc.d/nmbd
11
12
Define these nmbd_* variables in one of these files:
13
#       /etc/rc.conf
14
#	/etc/rc.conf.local
15
#       /etc/rc.conf.d/nmbd
16
#
17
# DO NOT CHANGE THESE DEFAULT VALUES HERE
18
#
19
nmbd_enable="YES"			# Enable nmbd
20
#nmbd_program="${prefix}/sbin/nmbd"	# Location of nmbd
21
#nmbd_flags=""				# Flags to nmbd
22
23
prefix=%%PREFIX%%
24
25
. %%RC_SUBR%%
26
27
name="nmbd"
28
rcvar=`set_rcvar`
29
command="$(prefix)/sbin/${name}"
30
command_args="-D"	# _must_ start as daemon from rc.d;
31
			# add more flags through ${${name}_flags}
32
pidfile="/var/run/nmbd.pid"
33
required_files="%%SAMBA_CONFDIR%%/smb.conf"
34
extra_commands="reload"
35
36
load_rc_config $name
37
run_rc_command "$1"
(-)samba-devel/files/samba.sh.sample (-22 lines)
Removed Link Here
1
#!/bin/sh
2
smbspool=/var/spool/samba
3
pidfiledir=/var/run
4
smbd=/usr/local/sbin/smbd
5
nmbd=/usr/local/sbin/nmbd
6
7
# start
8
if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
9
	if [ -f $smbd ]; then
10
		if [ -d $smbspool ]; then
11
			rm -f $smbspool/*
12
		fi
13
		echo -n ' Samba'
14
		$smbd -D
15
		$nmbd -D
16
	fi
17
18
# stop
19
elif [ "x$1" = "xstop" ]; then
20
	kill `cat $pidfiledir/smbd.pid`
21
	kill `cat $pidfiledir/nmbd.pid`
22
fi
(-)samba-devel/files/smbd.sh (+53 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
# PROVIDE: smbd
6
# BEFORE: nmbd
7
# REQUIRE: DAEMON
8
#
9
# NOTE for FreeBSD 5.0+:
10
# If you want this script to start with the base rc scripts
11
# move smbd.sh to /etc/rc.d/smbd
12
13
# Define these smbd_* variables in one of these files:
14
#       /etc/rc.conf
15
#	/etc/rc.conf.local
16
#       /etc/rc.conf.d/smbd
17
#
18
# DO NOT CHANGE THESE DEFAULT VALUES HERE
19
#
20
smbd_enable="YES"			# Enable smbd
21
#smbd_program="${prefix}/sbin/smbd"	# Location of smbd
22
#smbd_flags=""				# Flags to smbd program
23
#smbd_print_spooldir="/var/spool/samba"	# Location of Samba Print Spool
24
25
prefix=%%PREFIX%%
26
27
clear_print_spool()
28
{
29
	if [ -d $spooldir ]; then
30
		rm -f $spooldir/*
31
	fi
32
}
33
34
. %%RC_SUBR%%
35
36
name="smbd"
37
rcvar=`set_rcvar`
38
command="$(prefix)/sbin/${name}"
39
command_args="-D"	# _must_ start as daemon from rc.d;
40
			# add more flags through ${${name}_flags}
41
pidfile="/var/run/smbd.pid"
42
required_files="%%SAMBA_CONFDIR%%/smb.conf"
43
spooldir="/var/spool/samba"
44
extra_commands="reload"
45
start_precmd="clear_smbspool"
46
47
load_rc_config $name
48
49
if [ -n "$smbd_print_spooldir" ]; then
50
	spooldir=$smbd_print_spooldir
51
fi
52
53
run_rc_command "$1"

Return to bug 54352