summaryrefslogtreecommitdiff
path: root/sysutils/swapd
diff options
context:
space:
mode:
authorxtraeme <xtraeme@pkgsrc.org>2005-02-20 13:56:09 +0000
committerxtraeme <xtraeme@pkgsrc.org>2005-02-20 13:56:09 +0000
commitb43e8951d44069a2119cfbd06ef82a6957edc699 (patch)
tree92ab74ab02e7cb24b3257c17a8c805996fcffa45 /sysutils/swapd
parent1526c422945167547d8505ba428fc098becae422 (diff)
downloadpkgsrc-b43e8951d44069a2119cfbd06ef82a6957edc699.tar.gz
Update to 1.0.3
Made the free/used memory polling time configurable through the "delay" option. pkgsrc changes: modified the rc.d script to work on systems without the NetBSD's rc.d system.
Diffstat (limited to 'sysutils/swapd')
-rw-r--r--sysutils/swapd/Makefile5
-rw-r--r--sysutils/swapd/distinfo6
-rw-r--r--sysutils/swapd/files/swapd.sh43
3 files changed, 44 insertions, 10 deletions
diff --git a/sysutils/swapd/Makefile b/sysutils/swapd/Makefile
index fc37a1aff35..1fe51b48baf 100644
--- a/sysutils/swapd/Makefile
+++ b/sysutils/swapd/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2004/12/28 02:47:50 reed Exp $
+# $NetBSD: Makefile,v 1.7 2005/02/20 13:56:09 xtraeme Exp $
#
-DISTNAME= swapd-1.0.2
-PKGREVISION= 1
+DISTNAME= swapd-1.0.3
CATEGORIES= sysutils
MASTER_SITES= http://www.rkeene.org/files/oss/swapd/source/
diff --git a/sysutils/swapd/distinfo b/sysutils/swapd/distinfo
index 66d627ad008..0b5f068ed9c 100644
--- a/sysutils/swapd/distinfo
+++ b/sysutils/swapd/distinfo
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.3 2004/11/01 23:05:49 xtraeme Exp $
+$NetBSD: distinfo,v 1.4 2005/02/20 13:56:09 xtraeme Exp $
-SHA1 (swapd-1.0.2.tar.gz) = 5a54969dc3e94735cbd79d4484e58eac248bb5d0
-Size (swapd-1.0.2.tar.gz) = 90555 bytes
+SHA1 (swapd-1.0.3.tar.gz) = d2f567767ded2382c24505565e8aea1b8d88a746
+Size (swapd-1.0.3.tar.gz) = 90981 bytes
SHA1 (patch-ab) = 739bd4dca1287676b5a32304f96bc214da160b72
diff --git a/sysutils/swapd/files/swapd.sh b/sysutils/swapd/files/swapd.sh
index f32a52ecfa0..c33c5a24214 100644
--- a/sysutils/swapd/files/swapd.sh
+++ b/sysutils/swapd/files/swapd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: swapd.sh,v 1.3 2004/11/29 16:19:19 xtraeme Exp $
+# $NetBSD: swapd.sh,v 1.4 2005/02/20 13:56:09 xtraeme Exp $
#
# PROVIDE: swapd
# REQUIRE: DAEMON LOGIN
@@ -12,10 +12,45 @@ required_files="@PKG_SYSCONFDIR@/${name}.conf"
pidfile="@VARBASE@/run/${name}.pid"
sig_stop="KILL"
-. /etc/rc.subr
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
-load_rc_config $name
-run_rc_command "$1"
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ case ${1:-start} in
+ start)
+ if [ -x ${command} ]; then
+ echo "Starting ${command}."
+ eval ${command} ${distccd_flags} ${command_args}
+ fi
+ ;;
+ stop)
+ if [ -f ${pidfile} ]; then
+ pid=`/bin/head -1 ${pidfile}`
+ echo "Stopping ${name}."
+ kill -${sig_stop} ${pid}
+ else
+ echo "${name} not running?"
+ fi
+ ;;
+ restart)
+ ( $0 stop )
+ sleep 1
+ $0 start
+ ;;
+ status)
+ if [ -f ${pidfile} ]; then
+ pid=`/bin/head -1 ${pidfile}`
+ echo "${name} is running as pid ${pid}."
+ else
+ echo "${name} is not running."
+ fi
+ ;;
+ esac
+fi
if [ "$1" != "stop" -o "$1" != "status" ]; then
echo $(check_process $command) > $pidfile