aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2008-06-19 03:06:52 +0800
committercy <cy@FreeBSD.org>2008-06-19 03:06:52 +0800
commit0e1b65be46d137461ac4d73ab453544c469872af (patch)
tree524bd1411672c6ef32512bbed54dff5c24a8e3db /comms
parent0e3687f3c219d5a358e3efeea6b5db369a0b3e51 (diff)
downloadfreebsd-ports-gnome-0e1b65be46d137461ac4d73ab453544c469872af.tar.gz
freebsd-ports-gnome-0e1b65be46d137461ac4d73ab453544c469872af.tar.zst
freebsd-ports-gnome-0e1b65be46d137461ac4d73ab453544c469872af.zip
Implement USE_RC_SUBR and clean up rc script.
Thanks to: brooks
Diffstat (limited to 'comms')
-rw-r--r--comms/conserver/Makefile7
-rw-r--r--comms/conserver/files/conserver.sh42
-rw-r--r--comms/conserver/files/conserver.sh.in10
-rw-r--r--comms/conserver/pkg-plist1
4 files changed, 5 insertions, 55 deletions
diff --git a/comms/conserver/Makefile b/comms/conserver/Makefile
index 94d01f8fe727..a94e55427b9f 100644
--- a/comms/conserver/Makefile
+++ b/comms/conserver/Makefile
@@ -8,7 +8,7 @@
PORTNAME= conserver
PORTVERSION= 8.5
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= comms
MASTER_SITES= ftp://ftp.physics.purdue.edu/pub/pundits/ \
http://www.komquats.com/distfiles/ \
@@ -30,6 +30,7 @@ DEFAULTHOST?= localhost
DEFAULTPORT?= 782
MAKE_ENV+= DEFAULTHOST="${DEFAULTHOST}" DEFAULTPORT="${DEFAULTPORT}"
#PKGMESSAGE= ${WRKDIR}/MESSAGE
+USE_RC_SUBR= conserver.sh
do-build:
${REINPLACE_CMD} -e 's:/usr/local/lib:${PREFIX}/etc:g' \
@@ -64,10 +65,6 @@ do-install:
${PREFIX}/man/man8/autologin.8 \
${PREFIX}/man/man8/conserver.8 \
${PREFIX}/man/man8/console.8
-.if !exists(${PREFIX}/etc/rc.d/conserver.sh)
- @${ECHO_MSG} "Installing ${PREFIX}/etc/rc.d/conserver.sh startup file."
- @${INSTALL_SCRIPT} -m 751 ${FILESDIR}/conserver.sh ${PREFIX}/etc/rc.d
-.endif
@# ${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/comms/conserver/files/conserver.sh b/comms/conserver/files/conserver.sh
deleted file mode 100644
index 3c4cc86c37ee..000000000000
--- a/comms/conserver/files/conserver.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-
-# PROVIDE: conserver
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-# KEYWORD: shutdown
-
-# To enable conserver, add lines like below to /etc/rc.conf.
-#
-# conserver_enable="YES"
-
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- # echo "$0: Cannot determine the PREFIX" >&2
- # exit 1
-fi
-
-conserver_enable=${conserver_enable:-"no"}
-conserver_configfile=${conserver_configfile:-"${PREFIX}/etc/conserver.cf"}
-
-. /etc/rc.subr
-
-name=conserver
-rcvar=`set_rcvar`
-
-command=${PREFIX}/sbin/conserver
-command_args="-d -n -C ${conserver_configfile}"
-
-load_rc_config $name
-
-case "$1" in
-start) if [ -x ${command} -a -f ${configfile} ]; then
- run_rc_command "$1"
- fi
- ;;
-*)
- run_rc_command "$1"
- ;;
-esac
-
-exit 0
diff --git a/comms/conserver/files/conserver.sh.in b/comms/conserver/files/conserver.sh.in
index 3c4cc86c37ee..73c41fcbaecb 100644
--- a/comms/conserver/files/conserver.sh.in
+++ b/comms/conserver/files/conserver.sh.in
@@ -11,21 +11,17 @@
#
# conserver_enable="YES"
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- # echo "$0: Cannot determine the PREFIX" >&2
- # exit 1
-fi
-
conserver_enable=${conserver_enable:-"no"}
-conserver_configfile=${conserver_configfile:-"${PREFIX}/etc/conserver.cf"}
. /etc/rc.subr
name=conserver
rcvar=`set_rcvar`
-command=${PREFIX}/sbin/conserver
+command=%%PREFIX%%/sbin/conserver
+conserver_configfile=${conserver_configfile:-"%%PREFIX%%/etc/conserver.cf"}
command_args="-d -n -C ${conserver_configfile}"
+required_files=${conserver_configfile}
load_rc_config $name
diff --git a/comms/conserver/pkg-plist b/comms/conserver/pkg-plist
index 02f52897b01c..440dc72301d3 100644
--- a/comms/conserver/pkg-plist
+++ b/comms/conserver/pkg-plist
@@ -1,6 +1,5 @@
@comment $FreeBSD$
bin/console
etc/conserver.cf.eg
-etc/rc.d/conserver.sh
sbin/autologin
sbin/conserver