aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-07-04 06:44:28 +0800
committermarcus <marcus@FreeBSD.org>2004-07-04 06:44:28 +0800
commit22625887e97a175ab6680edfba0e0ad3d985fd47 (patch)
tree615e81066886b7f9ce27b0fbcfacaffb353f9e24 /net
parent6c65d2ce41d956b088d902037d2da68f89a44b72 (diff)
downloadfreebsd-ports-graphics-22625887e97a175ab6680edfba0e0ad3d985fd47.tar.gz
freebsd-ports-graphics-22625887e97a175ab6680edfba0e0ad3d985fd47.tar.zst
freebsd-ports-graphics-22625887e97a175ab6680edfba0e0ad3d985fd47.zip
Convert this port to use RCng.
Submitted by: kuriyama
Diffstat (limited to 'net')
-rw-r--r--net/netatalk-devel/Makefile9
-rw-r--r--net/netatalk-devel/files/netatalk.sh76
-rw-r--r--net/netatalk-devel/pkg-plist2
3 files changed, 53 insertions, 34 deletions
diff --git a/net/netatalk-devel/Makefile b/net/netatalk-devel/Makefile
index 98fcb98a14d..9b917b2525f 100644
--- a/net/netatalk-devel/Makefile
+++ b/net/netatalk-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= netatalk
PORTVERSION= 2.0.b2
+PORTREVISION= 1
CATEGORIES= net print
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= netatalk
@@ -23,6 +24,7 @@ LIB_DEPENDS+= slp.1:${PORTSDIR}/net/openslp
NO_LATEST_LINK= yes
USE_BZIP2= yes
USE_ICONV= yes
+USE_RC_SUBR= yes
CONFIGURE_ARGS+= --with-tcp-wrappers \
--with-pkgconfdir=${PREFIX}/etc \
--with-libiconv=${LOCALBASE}
@@ -67,6 +69,7 @@ MAN8= afpd.8 atalkd.8 cnid_dbd.8 cnid_metad.8 papd.8 papstatus.8 \
psf.8 timelord.8
CONFLICTS= bigloo-2.* cap-6.0.* tct-1.* netatalk-1*
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
pre-everything::
@${ECHO_MSG} ""
@@ -79,15 +82,15 @@ pre-everything::
@${ECHO_MSG} ""
post-extract:
- @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/netatalk.sh \
- > ${WRKSRC}/netatalk.sh
+ @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/netatalk.sh > ${WRKSRC}/netatalk.sh
post-install:
@${RM} -f ${PREFIX}/bin/nu ${PREFIX}/bin/lp2pap.sh \
${PREFIX}/bin/test_parse_mtab \
${PREFIX}/bin/afpd-mtab.pl ${PREFIX}/etc/netatalk.conf.dist
${INSTALL_SCRIPT} ${WRKSRC}/netatalk.sh \
- ${PREFIX}/etc/rc.d/netatalk.sh.sample
+ ${PREFIX}/etc/rc.d/netatalk.sh
${INSTALL_SCRIPT} ${WRKSRC}/contrib/macusers/macusers \
${PREFIX}/bin/macusers
.for i in ${FILES}
diff --git a/net/netatalk-devel/files/netatalk.sh b/net/netatalk-devel/files/netatalk.sh
index d5409ee58ac..2c7358a1f06 100644
--- a/net/netatalk-devel/files/netatalk.sh
+++ b/net/netatalk-devel/files/netatalk.sh
@@ -1,37 +1,53 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/net/netatalk-devel/files/Attic/netatalk.sh,v 1.2 2004-06-06 02:25:46 marcus Exp $
+# $FreeBSD: /tmp/pcvs/ports/net/netatalk-devel/files/Attic/netatalk.sh,v 1.3 2004-07-03 22:44:28 marcus Exp $
+#
+# PROVIDE: netatalk
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD
#
# AppleTalk daemons. Make sure not to start atalkd in the background:
# its data structures must have time to stablize before running the
# other processes.
#
-if ! test -x %%PREFIX%%/sbin/atalkd
-then
-# exit 0
-fi
-HOSTNAME=`hostname|sed 's/\..*$//'`
-case $1 in
-start)
- echo -n ' netatalk'
- %%PREFIX%%/sbin/atalkd
- %%PREFIX%%/bin/nbprgstr -p 4 ${HOSTNAME}:Workstation &
- %%PREFIX%%/bin/nbprgstr -p 4 ${HOSTNAME}:netatalk &
- %%PREFIX%%/sbin/papd
- %%PREFIX%%/sbin/cnid_metad
- %%PREFIX%%/sbin/afpd -s %%PREFIX%%/etc/AppleVolumes.system \
- -f %%PREFIX%%/etc/AppleVolumes.default
- [ -x %%PREFIX%%/sbin/timelord ] && %%PREFIX%%/sbin/timelord
- ;;
-stop)
- killall timelord
- killall afpd
- killall cnid_metad
- killall papd
- killall atalkd
- ;;
-*)
- echo "Usage: $0: [ start | stop ]" 2>&1
- exit 65
- ;;
-esac
+
+netatalk_enable="NO"
+atalkd_enable="NO"
+papd_enable="NO"
+cind_metad_enable="NO"
+afpd_enable="NO"
+timelord_enable="NO"
+
+. %%RC_SUBR%%
+
+name=netatalk
+rcvar=`set_rcvar`
+hostname=`hostname -s`
+
+start_cmd=netatalk_start
+stop_cmd=netatalk_stop
+
+netatalk_start() {
+ checkyesno atalkd_enable && %%PREFIX%%/sbin/atalkd
+ checkyesno atalkd_enable && \
+ %%PREFIX%%/bin/nbprgstr -p 4 ${hostname}:Workstation &
+ checkyesno atalkd_enable && \
+ %%PREFIX%%/bin/nbprgstr -p 4 ${hostname}:netatalk &
+ checkyesno papd_enable && %%PREFIX%%/sbin/papd
+ checkyesno cind_metad_enable && %%PREFIX%%/sbin/cnid_metad
+ checkyesno afpd_enable && \
+ %%PREFIX%%/sbin/afpd -s %%PREFIX%%/etc/AppleVolumes.system \
+ -f %%PREFIX%%/etc/AppleVolumes.default
+ checkyesno timelord_enable && %%PREFIX%%/sbin/timelord
+}
+
+netatalk_stop() {
+ checkyesno timelord_enable && killall timelord
+ checkyesno afpd_enable && killall afpd
+ checkyesno cind_metad_enable && killall cnid_metad
+ checkyesno papd_enable && killall papd
+ checkyesno atalkd_enable && killall atalkd
+}
+
+load_rc_config ${name}
+run_rc_command "$1"
diff --git a/net/netatalk-devel/pkg-plist b/net/netatalk-devel/pkg-plist
index f08e4f5127d..5dc3a400cd2 100644
--- a/net/netatalk-devel/pkg-plist
+++ b/net/netatalk-devel/pkg-plist
@@ -57,7 +57,7 @@ etc/atalkd.conf.dist
@unexec if cmp -s %D/etc/papd.conf %D/etc/papd.conf.dist; then rm -f %D/etc/papd.conf; fi
etc/papd.conf.dist
@exec [ ! -f %B/papd.conf ] && cp %B/%f %B/papd.conf
-etc/rc.d/netatalk.sh.sample
+etc/rc.d/netatalk.sh
etc/uams/uams_clrtxt.so
etc/uams/uams_dhx.so
%%NETATALKPAM%%etc/uams/uams_dhx_pam.so