diff options
author | Matthias Treydte <waldheinz@gmail.com> | 2010-04-05 18:41:35 +0000 |
---|---|---|
committer | Matthias Treydte <waldheinz@gmail.com> | 2010-04-05 18:41:35 +0000 |
commit | 8163839488752961fe7667a1fe961b051e18c934 (patch) | |
tree | 935aa0bd16e4235672457696877994bb11e033e2 /sys-apps | |
parent | Adding hexer license (diff) | |
download | sunrise-8163839488752961fe7667a1fe961b051e18c934.tar.gz sunrise-8163839488752961fe7667a1fe961b051e18c934.tar.bz2 sunrise-8163839488752961fe7667a1fe961b051e18c934.zip |
sys-apps/hd-idle: New Ebuild for bug #218821 thanks to hangfire, chiiph and Tommy[D]
svn path=/sunrise/; revision=10401
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/hd-idle/ChangeLog | 8 | ||||
-rw-r--r-- | sys-apps/hd-idle/Manifest | 6 | ||||
-rw-r--r-- | sys-apps/hd-idle/files/hd-idle-conf | 27 | ||||
-rw-r--r-- | sys-apps/hd-idle/files/hd-idle-init | 17 | ||||
-rw-r--r-- | sys-apps/hd-idle/hd-idle-1.01.ebuild | 28 | ||||
-rw-r--r-- | sys-apps/hd-idle/metadata.xml | 5 |
6 files changed, 91 insertions, 0 deletions
diff --git a/sys-apps/hd-idle/ChangeLog b/sys-apps/hd-idle/ChangeLog new file mode 100644 index 000000000..31ff83a3d --- /dev/null +++ b/sys-apps/hd-idle/ChangeLog @@ -0,0 +1,8 @@ +# ChangeLog for sys-apps/hd-idle +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 05 Apr 2010; Matthias Treydte <waldheinz@gmail.com> +hd-idle-1.01.ebuild, + +files/hd-idle-conf, +files/hd-idle-init, +metadata.xml: + New Ebuild for bug #218821 thanks to hangfire, chiiph and Tommy[D] + diff --git a/sys-apps/hd-idle/Manifest b/sys-apps/hd-idle/Manifest new file mode 100644 index 000000000..1eb54c120 --- /dev/null +++ b/sys-apps/hd-idle/Manifest @@ -0,0 +1,6 @@ +AUX hd-idle-conf 1422 RMD160 4ee3a2e3a49d337c1f28c7a9216d017628993fd3 SHA1 f4b1acbce6fac19727f1d4e0d904530cc6e68c8b SHA256 34a049765a2825bbe2a01cd1130642e3b20bbf38c678f15ada563b41d9fcf6b8 +AUX hd-idle-init 267 RMD160 2e61b95ae275edcc41267cfd1adf743f7114b8e1 SHA1 3d907c8fb4fec667fc6bffe9e903b16ac460f9a2 SHA256 0442322e45ae079154ad574aa4067434cb3faa8b953e2d392800207d1aec5035 +DIST hd-idle-1.01.tgz 15250 RMD160 f4096863fd4c0174dd28183f876fd5680bd9d84a SHA1 73aee8b3fb6200aba7f8bd493b9bfecd8ccf59d2 SHA256 34bbd43b4805590908006901369a937584c4348537030a2a41b2ec32cf7c94b5 +EBUILD hd-idle-1.01.ebuild 850 RMD160 8533b44718024cd7766dda0d5ce1a43fbaacbeae SHA1 2904b458f8ad20bbf2a6d8015f9f61f7f48792dc SHA256 0929747cc1b0f998b6dbfd141e0ee9164b345502c63d9867b2bed1a16f631c3a +MISC ChangeLog 322 RMD160 ac60567e3c09ddfd82b2c5a5391cc09a900025c2 SHA1 b0d775db7ae9ac87bbeda9662465858f54b0c794 SHA256 ee2013b9c54a75bd4bd9724e10b58e1e9f7e38ea496d40b4a6b28facc4bcff9d +MISC metadata.xml 171 RMD160 ed284df01c230fc7990a6b5888b39166d23f29ba SHA1 f3d64a69044b710e23fb874b3ee4cd338858c8b4 SHA256 a7b30fbacd0e4c312c07a3efac112a3794c81d134442d8104325734d03425adf diff --git a/sys-apps/hd-idle/files/hd-idle-conf b/sys-apps/hd-idle/files/hd-idle-conf new file mode 100644 index 000000000..3cbac6aa8 --- /dev/null +++ b/sys-apps/hd-idle/files/hd-idle-conf @@ -0,0 +1,27 @@ +# defaults file for hd-idle + +# hd-idle command line options +# Options are: +# -a Set (partial) device name of disks for subsequent +# idle-time parameters (-i). This parameter is optional +# in the sense that there's a default entry for all +# disks which are not named otherwise by using this +# parameter. +# -i <idle_time> Idle time in seconds. +# -l <logfile> Name of logfile (written only after a disk has spun +# up). Please note that this option might cause the +# disk which holds the logfile to spin up just because +# another disk had some activity. This option should +# not be used on systems with more than one disk +# except for tuning purposes. On single-disk systems, +# this option should not cause any additional spinups. +# +# Options not exactly useful here: +# -t <disk> Spin-down the specfified disk immediately and exit. +# -d Debug mode. This will prevent hd-idle from +# becoming a daemon and print debugging info to +# stdout/stderr +# -h Print usage information. + +#HD_IDLE_OPTS="-i 180 -l /var/log/hd-idle.log" + diff --git a/sys-apps/hd-idle/files/hd-idle-init b/sys-apps/hd-idle/files/hd-idle-init new file mode 100644 index 000000000..2512f3869 --- /dev/null +++ b/sys-apps/hd-idle/files/hd-idle-init @@ -0,0 +1,17 @@ +#!/sbin/runscript + +depend() { + after bootmisc +} + +start() { + ebegin "Starting hd-idle" + start-stop-daemon --start --exec /usr/sbin/hd-idle -- ${HD_IDLE_OPTS} + eend $? +} + +stop() { + ebegin "Stopping hd-idle" + start-stop-daemon --stop --exec /usr/sbin/hd-idle + eend $? +} diff --git a/sys-apps/hd-idle/hd-idle-1.01.ebuild b/sys-apps/hd-idle/hd-idle-1.01.ebuild new file mode 100644 index 000000000..ebfbaf485 --- /dev/null +++ b/sys-apps/hd-idle/hd-idle-1.01.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +DESCRIPTION="Utility for spinning down hard disks after a period of idle time" +HOMEPAGE="http://hd-idle.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +src_install() { + dosbin hd-idle || die "dosbin failed" + newinitd "${FILESDIR}"/hd-idle-init hd-idle || die "newinitd failed" + newconfd "${FILESDIR}"/hd-idle-conf hd-idle || die "newconfd failed" +} + +pkg_postinst() { + if [ ! -f /proc/diskstats ] + then + ewarn "Please note that hd-idle uses /proc/diskstats to read disk" + ewarn "statistics. If this file is not present, hd-idle won't work." + ewarn "You should check your kernel configuration and make sure" + ewarn "it includes CONFIG_PROC_FS=y." + fi +} diff --git a/sys-apps/hd-idle/metadata.xml b/sys-apps/hd-idle/metadata.xml new file mode 100644 index 000000000..6f1d493c5 --- /dev/null +++ b/sys-apps/hd-idle/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>maintainer-wanted</herd> +</pkgmetadata> |