summaryrefslogtreecommitdiff
path: root/net/upclient
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2003-07-30 17:56:42 +0000
committerjmmv <jmmv@pkgsrc.org>2003-07-30 17:56:42 +0000
commit1e1dfbb62bf9ce39f8d56df1612c8ce86e2e3326 (patch)
tree6dd7d2b33fd542eaa039cb3963a686dc9ee80938 /net/upclient
parente918ba458b8f4c81938d4e7b272d466b55072339 (diff)
downloadpkgsrc-1e1dfbb62bf9ce39f8d56df1612c8ce86e2e3326.tar.gz
Use RCD_SCRIPTS from bsd.pkg.install.mk to automatically handle the rc.d
script and convert it to the standard rc.subr format. Bump PKGREVISION to 3.
Diffstat (limited to 'net/upclient')
-rw-r--r--net/upclient/MESSAGE7
-rw-r--r--net/upclient/Makefile12
-rw-r--r--net/upclient/files/upclient.sh28
3 files changed, 23 insertions, 24 deletions
diff --git a/net/upclient/MESSAGE b/net/upclient/MESSAGE
index a02609bfe57..403e8fed2f7 100644
--- a/net/upclient/MESSAGE
+++ b/net/upclient/MESSAGE
@@ -1,10 +1,7 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.4 2003/07/02 18:22:42 jmmv Exp $
+$NetBSD: MESSAGE,v 1.5 2003/07/30 17:56:42 jmmv Exp $
-To start the Uptime Client, run the ${PREFIX}/etc/rc.d/upclient
-script either manually or via /etc/rc.local.
-
-Register your server at http://uptimes.wonko.com then edit
+Register your server at http://uptimes.wonko.com/ then edit
${PKG_SYSCONFDIR}/upclient.conf to add your assigned AuthKey.
===========================================================================
diff --git a/net/upclient/Makefile b/net/upclient/Makefile
index 7b1a0e4f142..5dc7141326a 100644
--- a/net/upclient/Makefile
+++ b/net/upclient/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.13 2003/07/17 22:51:59 grant Exp $
+# $NetBSD: Makefile,v 1.14 2003/07/30 17:56:42 jmmv Exp $
#
DISTNAME= upclient-4.2.1.23
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= net
MASTER_SITES= http://uptimes.atomicvoid.net/files/
@@ -19,6 +19,8 @@ EGDIR= ${PREFIX}/share/examples/upclient
CONF_FILES= ${EGDIR}/upclient.conf ${PKG_SYSCONFDIR}/upclient.conf
CFLAGS+= -DPKG_SYSCONFDIR=\"\\\"${PKG_SYSCONFDIR}\\\"\"
+RCD_SCRIPTS= upclient
+
BUILD_DIRS= ${WRKSRC}/src
pre-configure:
@@ -38,11 +40,5 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/INSTALL ${PREFIX}/share/doc/upclient
${INSTALL_DATA_DIR} ${EGDIR}
${INSTALL_DATA} ${WRKSRC}/conf/upclient.conf ${EGDIR}
- ${SED} \
- -e 's|@PREFIX@|${PREFIX}|g' \
- -e 's|@INSTALL@|${INSTALL}|g' \
- -e 's|@SU@|${SU}|g' \
- ${FILESDIR}/upclient.sh >${PREFIX}/etc/rc.d/upclient
- ${CHMOD} +x ${PREFIX}/etc/rc.d/upclient
.include "../../mk/bsd.pkg.mk"
diff --git a/net/upclient/files/upclient.sh b/net/upclient/files/upclient.sh
index 9f2db5cb385..4843ea3378a 100644
--- a/net/upclient/files/upclient.sh
+++ b/net/upclient/files/upclient.sh
@@ -1,18 +1,24 @@
-#!/bin/sh
+#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: upclient.sh,v 1.6 2002/09/23 15:24:13 grant Exp $
+# $NetBSD: upclient.sh,v 1.7 2003/07/30 17:56:43 jmmv Exp $
+#
+# PROVIDE: upclient
+# REQUIRE: NETWORK
#
-pidfile=/var/run/upclient.pid
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
-if [ "$1" = "stop" ]; then
- kill `cat $pidfile`
+name="upclient"
+rcvar="${name}"
+command="@PREFIX@/bin/upclient"
+upclient_user="nobody"
+if [ -f /etc/rc.subr ]; then
+ load_rc_config "$name"
+ run_rc_command "$1"
else
- if [ -x @PREFIX@/bin/upclient ]
- then
- @INSTALL@ -o nobody -m 644 /dev/null $pidfile
- @SU@ -m nobody -c @PREFIX@/bin/upclient
- echo -n ' upclient'
- fi
+ printf ' upclient'
+ ${command} ${upclient_flags} ${command_args}
fi