diff options
author | Dan Armak <danarmak@gentoo.org> | 2001-07-23 19:47:01 +0000 |
---|---|---|
committer | Dan Armak <danarmak@gentoo.org> | 2001-07-23 19:47:01 +0000 |
commit | 45faa60e72e4e7cdd0709ad05bd200710fa252b3 (patch) | |
tree | 5080d437fdfbf87f5e83460fe71a6942508d7e5e /sys-apps/noflushd | |
parent | minor update (diff) | |
download | gentoo-2-45faa60e72e4e7cdd0709ad05bd200710fa252b3.tar.gz gentoo-2-45faa60e72e4e7cdd0709ad05bd200710fa252b3.tar.bz2 gentoo-2-45faa60e72e4e7cdd0709ad05bd200710fa252b3.zip |
noflushd is a userland daemon for spinning down disks despite periodic write accesses from e.g. syslog, taking over from kupdated at run time. No kernel chamges or anything like that are necessary.
If someone thinks the init script's boot order (70) or the category (sys-apps) or (most likely) the config system is wrong, write me.
Diffstat (limited to 'sys-apps/noflushd')
-rw-r--r-- | sys-apps/noflushd/files/70noflushd | 10 | ||||
-rw-r--r-- | sys-apps/noflushd/files/digest-noflushd-2.4 | 1 | ||||
-rw-r--r-- | sys-apps/noflushd/files/noflushd | 30 | ||||
-rw-r--r-- | sys-apps/noflushd/noflushd-2.4.ebuild | 70 |
4 files changed, 111 insertions, 0 deletions
diff --git a/sys-apps/noflushd/files/70noflushd b/sys-apps/noflushd/files/70noflushd new file mode 100644 index 000000000000..333833341c08 --- /dev/null +++ b/sys-apps/noflushd/files/70noflushd @@ -0,0 +1,10 @@ +# Settings for the noflushd daemon: + +# Default timeout in minutes to sipn down disk +NOFLUSHD_TIMEOUT=60 + +# Disks to handle +NOFLUSHD_DISKS='/dev/discs/disc0/disc' + +# Run 'noflushd -h' to find out how to set individual timeouts +# for different discs.
\ No newline at end of file diff --git a/sys-apps/noflushd/files/digest-noflushd-2.4 b/sys-apps/noflushd/files/digest-noflushd-2.4 new file mode 100644 index 000000000000..aacb22f941a8 --- /dev/null +++ b/sys-apps/noflushd/files/digest-noflushd-2.4 @@ -0,0 +1 @@ +MD5 b248ff04030ffa79a14ef76f3d0ff8f0 noflushd_2.4.orig.tar.gz diff --git a/sys-apps/noflushd/files/noflushd b/sys-apps/noflushd/files/noflushd new file mode 100644 index 000000000000..ddf280be20ad --- /dev/null +++ b/sys-apps/noflushd/files/noflushd @@ -0,0 +1,30 @@ +#!/bin/sh +#RCUPDATE:2 3 4:70:This line is required for script management + +. /etc/rc.d/config/functions +. /etc/rc.d/config/basic + +SERVICE="noflushd" +opts="start stop restart" + +PIDFILE=/var/run/noflushd.pid +EXE=/usr/sbin/noflushd + +start() { + ebegin "Starting $SERVICE" + start-stop-daemon --start --quiet --exec "$EXE" -- -n $NOFLUSHD_TIMEOUT $NOFLUSHD_DISKS + eend $? "Started $SERVICE." "Error starting $SERVICE." +} + +stop() { + ebegin "Stopping $SERVICE" + start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $EXE + eend $? "Stopped $SERVICE." "Error stopping $SERVICE." +} + +restart() { + stop + start +} + +doservice ${@} diff --git a/sys-apps/noflushd/noflushd-2.4.ebuild b/sys-apps/noflushd/noflushd-2.4.ebuild new file mode 100644 index 000000000000..19ee0ba2c466 --- /dev/null +++ b/sys-apps/noflushd/noflushd-2.4.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2001 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Dan Armak <danarmak@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/noflushd/noflushd-2.4.ebuild,v 1.1 2001/07/23 19:47:01 danarmak Exp $ +# Note: the daemon's current 2.4 version has nothing to do with kernel versions + +#P="" +A=noflushd_2.4.orig.tar.gz +S=${WORKDIR}/${P}.orig +SRC_URI="http://download.suorceforge.net/noflushd/${A}" + +HOMEPAGE="http://noflushd.sourceforge.net" +DESCRIPTION="A daemon to spin down your disks and force accesses to be cached" + +DEPEND="" + +src_compile() { + + confopts="--infodir=/usr/share/info --mandir=/usr/share/man --prefix=/usr --host=${CHOST} --with-docdir=/usr/share/doc/${P}" + + try ./configure ${confopts} + + try emake + +} + +src_install () { + + # The orig. noflushd includes startup scripts for suse, debian and redhat. + # It detects gentoo as redhat (at least here it does), and in any case + # we don't want any of its rc.d scripts, so we install manually. There's + # only one binary and the docs. + + cd ${S} + + into /usr + dosbin src/noflushd + doman man/noflushd.8 + + dodoc README NEWS + + exeinto /etc/rc.d/init.d + doexe ${FILESDIR}/noflushd + + insinto /etc/env.d + doins ${FILESDIR}/70noflushd + +} + +pkg_postinst() { + + # try to enable env-update settings + . /etc/profile.env + + echo " + Run rc-update add noflushd to add it to runlevels 2 3 4. + + Edit /etc/env.d/70noflushd to change the default spindown + timeout and the disks handled; the defaults are 60 minutes + and /dev/discs/disc0/disc (i.e. hda). + + NOTE: you should re-login for the env-update changes to take + effect before you run noflushd for the first time. + + WARNING: + WARNING: Do NOT use with SCSI, unstable! + WARNING: + " + +}
\ No newline at end of file |