summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Chandler <sethbc@gentoo.org>2003-03-01 21:17:39 +0000
committerSeth Chandler <sethbc@gentoo.org>2003-03-01 21:17:39 +0000
commitc30ffab7bb3faf45c28ef99eb518a8f06c312f1f (patch)
treef9df3a18d9c0dc7bfb9e5fbe30f094020292bf8a /sys-apps/hdparm
parentfix installation (diff)
downloadhistorical-c30ffab7bb3faf45c28ef99eb518a8f06c312f1f.tar.gz
historical-c30ffab7bb3faf45c28ef99eb518a8f06c312f1f.tar.bz2
historical-c30ffab7bb3faf45c28ef99eb518a8f06c312f1f.zip
updated rc-scripts for hdparm
Diffstat (limited to 'sys-apps/hdparm')
-rw-r--r--sys-apps/hdparm/ChangeLog9
-rw-r--r--sys-apps/hdparm/files/digest-hdparm-5.3-r21
-rw-r--r--sys-apps/hdparm/files/hdparm-conf.d15
-rw-r--r--sys-apps/hdparm/files/hdparm-new-init105
-rw-r--r--sys-apps/hdparm/hdparm-5.3-r2.ebuild39
5 files changed, 168 insertions, 1 deletions
diff --git a/sys-apps/hdparm/ChangeLog b/sys-apps/hdparm/ChangeLog
index 42efeee4da29..2aa8e8e986c2 100644
--- a/sys-apps/hdparm/ChangeLog
+++ b/sys-apps/hdparm/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/hdparm
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/ChangeLog,v 1.19 2003/02/17 16:07:36 gmsoft Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/ChangeLog,v 1.20 2003/03/01 21:17:39 sethbc Exp $
+
+*hdparm-5.3-r2 (01 Mar 2003)
+
+ 01 Mar 2003; Seth Chandler <sethbc@gentoo.org> hdparm-5.3-r2.ebuild,
+ files/hdparm-conf.d, files/hdparm-new-init:
+ updated the rc-scripts for hdparm, thanks to Justin "Nagash" Jones, this fixes
+ bug 16603
17 Feb 2003; Guy Martin <gmsoft@gentoo.org> hdparm-5.3-r1.ebuild :
Added hppa to keywords.
diff --git a/sys-apps/hdparm/files/digest-hdparm-5.3-r2 b/sys-apps/hdparm/files/digest-hdparm-5.3-r2
new file mode 100644
index 000000000000..9d54b2662de0
--- /dev/null
+++ b/sys-apps/hdparm/files/digest-hdparm-5.3-r2
@@ -0,0 +1 @@
+MD5 86c4d4508ce8289132bc6fdf71b5a5a9 hdparm-5.3.tar.gz 35837
diff --git a/sys-apps/hdparm/files/hdparm-conf.d b/sys-apps/hdparm/files/hdparm-conf.d
new file mode 100644
index 000000000000..cf208a58aec0
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-conf.d
@@ -0,0 +1,15 @@
+# Copyright 2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/files/hdparm-conf.d,v 1.1 2003/03/01 21:17:39 sethbc Exp $
+
+# You can either set hdparm arguments for each drive using disc*_args and cdrom*_args..
+# eg.
+# disc0_args="-d1 -X66"
+# disc1_args"-d1"
+# cdrom0_args="-d1"
+
+# Or, you can set hdparm options for ALL drives using all_args..
+# eg.
+# this mimics the behavior of the current script
+all_args="-d1"
+
diff --git a/sys-apps/hdparm/files/hdparm-new-init b/sys-apps/hdparm/files/hdparm-new-init
new file mode 100644
index 000000000000..fe6050136b98
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-new-init
@@ -0,0 +1,105 @@
+#!/sbin/runscript
+# Copyright 2003 Justin "Nagash" Jones
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/files/hdparm-new-init,v 1.1 2003/03/01 21:17:39 sethbc Exp $
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ drives=""
+ cdroms=""
+
+ for i in `dir /dev/discs`
+ do
+ if [ ! -n "`ls -la /dev/discs/${i} | grep scsi`" ]
+ then
+ all_discs="${all_discs} `basename ${i}`"
+ elif [ ! -n "${all_args}" ]
+ then
+ ewarn "Skipping $i hdparm does not support SCSI devices."
+ fi
+ done
+ for i in `dir /dev/cdroms`
+ do
+ if [ ! -n "`ls -la /dev/cdroms/${i} | grep scsi`" ]
+ then
+ all_cdroms="${all_cdroms} `basename ${i}`"
+ elif [ ! -n "${all_args}" ]
+ then
+ ewarn "Skipping $i hdparm does not support SCSI devices."
+ fi
+ done
+
+ for i in ${all_discs}
+ do
+ tmp_args=${i}_args
+ eval hd_args=\$${tmp_args}
+
+ if [ -n "${hd_args}" ]
+ then
+ drives="$drives $i"
+ fi
+ done
+
+ for i in ${all_cdroms}
+ do
+ tmp_args=${i}_args
+ eval hd_args=\$${tmp_args}
+
+ if [ -n "${hd_args}" ]
+ then
+ cdroms="$cdroms $i"
+ fi
+ done
+}
+
+start() {
+ ebegin "Starting hdparm"
+ checkconfig
+
+ if [ -n "${all_args}" ]
+ then
+ for i in ${all_discs}
+ do
+ ebegin "Running hdparm on ${i}"
+ hdparm ${all_args} /dev/discs/${i}/disc &> /dev/null
+ eend $? "Failed to start hdparm on ${i}."
+ done
+
+ for i in ${all_cdroms}
+ do
+ ebegin "Running hdparm on ${i}"
+ hdparm ${all_args} /dev/cdroms/${i} &> /dev/null
+ eend $? "Failed to start hdparm on ${i}."
+ done
+ else
+ for i in ${drives}
+ do
+ tmp_args=${i}_args
+ eval hd_args=\$$tmp_args
+ ebegin "Running hdparm on ${i}"
+ hdparm $hd_args /dev/discs/${i}/disc &> /dev/null
+ eend $? "Failed to start hdparm on ${i}."
+ done
+
+ for i in ${cdroms}
+ do
+ tmp_args=${i}_args
+ eval hd_args=\$$tmp_args
+ ebegin "Running hdparm on ${i}"
+ hdparm $hd_args /dev/cdroms/${i} &> /dev/null
+ eend $? "Failed to start hdparm on ${i}."
+ done
+ fi
+
+ eend $? "Failed to start hdparm."
+}
+
+stop() {
+ ebegin "Stopping hdparm"
+
+ eend $? "Failed to stop hdparm."
+}
+
diff --git a/sys-apps/hdparm/hdparm-5.3-r2.ebuild b/sys-apps/hdparm/hdparm-5.3-r2.ebuild
new file mode 100644
index 000000000000..b134e84152f4
--- /dev/null
+++ b/sys-apps/hdparm/hdparm-5.3-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/hdparm-5.3-r2.ebuild,v 1.1 2003/03/01 21:17:39 sethbc Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Utility to change hard drive performance parameters"
+SRC_URI="http://www.ibiblio.org/pub/Linux/system/hardware/${P}.tar.gz"
+HOMEPAGE="http://www.ibiblio.org/pub/Linux/system/hardware/"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~alpha hppa"
+
+RDEPEND="virtual/glibc"
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ einfo ""
+ einfo "The rc-script for hdparm has been updated, so make sure "
+ einfo "that you etc-update. The script is much more configurable"
+ einfo "for details please see /etc/conf.d/hdparm"
+ einfo ""
+ emake || die "compile error"
+}
+
+src_install() {
+ into /
+ dosbin hdparm contrib/idectl
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/hdparm-new-init hdparm
+
+ insinto /etc/conf.d
+ newins ${FILESDIR}/hdparm-conf.d hdparm
+
+ doman hdparm.8
+ dodoc hdparm.lsm Changelog README.acoustic hdparm-sysconfig
+}
+