summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorjlam <jlam>2002-08-07 09:15:43 +0000
committerjlam <jlam>2002-08-07 09:15:43 +0000
commit31ae6c2f11a2d748642e1ea5678ae382142bfb10 (patch)
tree18e0f97dc97c27d4f843e9df4c6efd8b324dc053 /www
parent398443620bd91447a798d1af4a1cf951ec0c0063 (diff)
downloadpkgsrc-31ae6c2f11a2d748642e1ea5678ae382142bfb10.tar.gz
Merge wwwoffle.sh and wwwoffled into one rc.d script that follows pkgsrc
conventions for rc.d scripts.
Diffstat (limited to 'www')
-rw-r--r--www/wwwoffle/Makefile5
-rw-r--r--www/wwwoffle/PLIST3
-rw-r--r--www/wwwoffle/files/wwwoffle.sh10
-rw-r--r--www/wwwoffle/files/wwwoffled16
4 files changed, 13 insertions, 21 deletions
diff --git a/www/wwwoffle/Makefile b/www/wwwoffle/Makefile
index d301c0a59a2..7c1e6029e94 100644
--- a/www/wwwoffle/Makefile
+++ b/www/wwwoffle/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2002/08/06 01:20:20 itojun Exp $
+# $NetBSD: Makefile,v 1.40 2002/08/07 09:15:43 jlam Exp $
DISTNAME= wwwoffle-2.7c
PKGREVISION= 2
@@ -28,8 +28,6 @@ post-build:
-e 's#/usr/local#${PREFIX}#' <$$f.old >$$f; \
${RM} $$f.old; \
done
- @${SED} -e 's#@PREFIX@#${PREFIX}#g' <${FILESDIR}/wwwoffle.sh \
- >${WRKDIR}/wwwoffle.sh
@${SED} -e 's#@PREFIX@#${PREFIX}#g' <${FILESDIR}/wwwoffled \
>${WRKDIR}/wwwoffled
@@ -46,7 +44,6 @@ post-install:
${PREFIX}/sbin/wwwoffle-upgrade-config.pl
${INSTALL_SCRIPT} ${WRKSRC}/conf/upgrade-config-2.x-2.5.pl \
${PREFIX}/sbin/wwwoffle-upgrade-config-2.x-2.5.pl
- ${INSTALL_SCRIPT} ${WRKDIR}/wwwoffle.sh ${PREFIX}/etc/rc.d/wwwoffle
${INSTALL_SCRIPT} ${WRKDIR}/wwwoffled ${PREFIX}/etc/rc.d
# Directories other than html and search are automatically created at run time
${GTAR} czCf / ${PREFIX}/libdata/wwwoffle-spool.tar.gz \
diff --git a/www/wwwoffle/PLIST b/www/wwwoffle/PLIST
index 91fdfc49642..4fa3ee2fcaa 100644
--- a/www/wwwoffle/PLIST
+++ b/www/wwwoffle/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2002/03/10 22:14:30 fredb Exp $
+@comment $NetBSD: PLIST,v 1.4 2002/08/07 09:15:43 jlam Exp $
bin/wwwoffle
bin/wwwoffle-hash
bin/wwwoffle-ls
@@ -7,7 +7,6 @@ bin/wwwoffle-read
bin/wwwoffle-rm
bin/wwwoffle-tools
bin/wwwoffle-write
-etc/rc.d/wwwoffle
etc/rc.d/wwwoffled
etc/wwwoffle/wwwoffle.conf.install
@exec if [ ! -f ${PKG_SYSCONFDIR}/wwwoffle/wwwoffle.conf ]; then cp -p ${PKG_SYSCONFDIR}/wwwoffle/wwwoffle.conf.install ${PKG_SYSCONFDIR}/wwwoffle/wwwoffle.conf; fi
diff --git a/www/wwwoffle/files/wwwoffle.sh b/www/wwwoffle/files/wwwoffle.sh
deleted file mode 100644
index 458d2377c27..00000000000
--- a/www/wwwoffle/files/wwwoffle.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: wwwoffle.sh,v 1.1 1998/06/06 17:03:58 tron Exp $
-#
-if [ -x @PREFIX@/sbin/wwwoffled -a -f @PREFIX@/etc/wwwoffle/wwwoffle.conf ];
-then
- @PREFIX@/sbin/wwwoffled -c @PREFIX@/etc/wwwoffle/wwwoffle.conf >/dev/null 2>&1 &
- echo -n ' wwwoffled'
-fi
-exit 0
diff --git a/www/wwwoffle/files/wwwoffled b/www/wwwoffle/files/wwwoffled
index ddfebc481b0..eabf7305b8e 100644
--- a/www/wwwoffle/files/wwwoffled
+++ b/www/wwwoffle/files/wwwoffled
@@ -1,12 +1,13 @@
#!/bin/sh
#
-# $NetBSD: wwwoffled,v 1.2 2001/10/25 10:20:59 wiz Exp $
+# $NetBSD: wwwoffled,v 1.3 2002/08/07 09:15:44 jlam Exp $
#
-
# PROVIDE: wwwoffled
# REQUIRE: DAEMON network
-. /etc/rc.subr
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
name="wwwoffled"
command="@PREFIX@/sbin/${name}"
@@ -26,5 +27,10 @@ wwwoffled_start() {
eval "${control_prog} -fetch ${command_args}"
}
-load_rc_config $name
-run_rc_command "$1"
+if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ echo -n ' ${name}'
+ ${start_cmd}
+fi