pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/swapd Update to 1.0.3



details:   https://anonhg.NetBSD.org/pkgsrc/rev/605c0b603c87
branches:  trunk
changeset: 489385:605c0b603c87
user:      xtraeme <xtraeme%pkgsrc.org@localhost>
date:      Sun Feb 20 13:56:09 2005 +0000

description:
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:

 sysutils/swapd/Makefile       |   5 ++---
 sysutils/swapd/distinfo       |   6 +++---
 sysutils/swapd/files/swapd.sh |  43 +++++++++++++++++++++++++++++++++++++++----
 3 files changed, 44 insertions(+), 10 deletions(-)

diffs (86 lines):

diff -r 246409f342f7 -r 605c0b603c87 sysutils/swapd/Makefile
--- a/sysutils/swapd/Makefile   Sun Feb 20 13:53:23 2005 +0000
+++ b/sysutils/swapd/Makefile   Sun Feb 20 13:56:09 2005 +0000
@@ -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 -r 246409f342f7 -r 605c0b603c87 sysutils/swapd/distinfo
--- a/sysutils/swapd/distinfo   Sun Feb 20 13:53:23 2005 +0000
+++ b/sysutils/swapd/distinfo   Sun Feb 20 13:56:09 2005 +0000
@@ -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 -r 246409f342f7 -r 605c0b603c87 sysutils/swapd/files/swapd.sh
--- a/sysutils/swapd/files/swapd.sh     Sun Feb 20 13:53:23 2005 +0000
+++ b/sysutils/swapd/files/swapd.sh     Sun Feb 20 13:56:09 2005 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index