summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-apps/hdparm/ChangeLog10
-rw-r--r--sys-apps/hdparm/Manifest12
-rw-r--r--sys-apps/hdparm/files/digest-hdparm-5.3-r21
-rw-r--r--sys-apps/hdparm/files/digest-hdparm-5.5-r11
-rw-r--r--sys-apps/hdparm/files/hdparm-conf.d.314
-rw-r--r--sys-apps/hdparm/files/hdparm-init14
-rw-r--r--sys-apps/hdparm/files/hdparm-init-2 (renamed from sys-apps/hdparm/files/hdparm-new-init)2
-rw-r--r--sys-apps/hdparm/files/hdparm-init-3132
-rw-r--r--sys-apps/hdparm/hdparm-5.4.ebuild4
-rw-r--r--sys-apps/hdparm/hdparm-5.5-r1.ebuild (renamed from sys-apps/hdparm/hdparm-5.3-r2.ebuild)20
-rw-r--r--sys-apps/hdparm/hdparm-5.5.ebuild4
11 files changed, 183 insertions, 31 deletions
diff --git a/sys-apps/hdparm/ChangeLog b/sys-apps/hdparm/ChangeLog
index 0e66602543bc..12282b3f511c 100644
--- a/sys-apps/hdparm/ChangeLog
+++ b/sys-apps/hdparm/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-apps/hdparm
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/ChangeLog,v 1.40 2004/06/24 22:09:33 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/ChangeLog,v 1.41 2004/08/01 14:43:43 lanius Exp $
+
+*hdparm-5.5-r1 (01 Aug 2004)
+
+ 01 Aug 2004; Heinrich Wendel <lanius@gentoo.org> hdparm-5.3-r2.ebuild,
+ hdparm-5.4.ebuild, hdparm-5.5-r1.ebuild, hdparm-5.5.ebuild,
+ files/hdparm-conf.d.3, files/hdparm-init, files/hdparm-init-2,
+ files/hdparm-init-3, files/hdparm-new-init:
+ great enhancements of the init script, see bug #37755, remove old version
01 Jun 2004; Travis Tilley <lv@gentoo.org> hdparm-5.5.ebuild:
stable on amd64
diff --git a/sys-apps/hdparm/Manifest b/sys-apps/hdparm/Manifest
index 628e52546cad..f8770a9cbb91 100644
--- a/sys-apps/hdparm/Manifest
+++ b/sys-apps/hdparm/Manifest
@@ -1,12 +1,12 @@
-MD5 dcaed5a8c2243ef4424fc6778e1dae34 hdparm-5.5.ebuild 1279
-MD5 83695ca14336badc025faaaee3407e5b hdparm-5.4.ebuild 1160
-MD5 3f2b802fbfccffd6c35f930dbb3563d9 hdparm-5.3-r2.ebuild 1041
+MD5 9305a8e7a21065aa1a553d54cb02a8c2 hdparm-5.5.ebuild 1277
+MD5 180ba8136db62a97c29138ce6d969cc3 hdparm-5.4.ebuild 1158
+MD5 27eb70759d477db1c3cc592699e37012 hdparm-5.5-r1.ebuild 1281
MD5 31623fda9d3df682c8687efeb4b5595b ChangeLog 4709
MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
-MD5 178dd3c530efe5bd6ba09403834310e9 files/hdparm-new-init 2130
MD5 300982c72dc0f865d5ad6c542e3b6c4c files/digest-hdparm-5.4 61
MD5 f5fc13fdfccb0f5600d45488c6a5d534 files/digest-hdparm-5.5 61
-MD5 2dce6a794ee972dd32a703fa16cc3b35 files/hdparm-init 372
MD5 58b06c855068c6d95b0f665c201d6051 files/hdparm-5.4-readahead_rename.patch 1254
MD5 df34e5b7ce0bd009ea839e6f4de4c23f files/hdparm-conf.d 512
-MD5 a6bccb876455636b364c093460cbb994 files/digest-hdparm-5.3-r2 61
+MD5 178dd3c530efe5bd6ba09403834310e9 files/hdparm-init-2 2130
+MD5 693ed951157617495827a974fc223e4d files/hdparm-init-3 3347
+MD5 f5fc13fdfccb0f5600d45488c6a5d534 files/digest-hdparm-5.5-r1 61
diff --git a/sys-apps/hdparm/files/digest-hdparm-5.3-r2 b/sys-apps/hdparm/files/digest-hdparm-5.3-r2
deleted file mode 100644
index 9d54b2662de0..000000000000
--- a/sys-apps/hdparm/files/digest-hdparm-5.3-r2
+++ /dev/null
@@ -1 +0,0 @@
-MD5 86c4d4508ce8289132bc6fdf71b5a5a9 hdparm-5.3.tar.gz 35837
diff --git a/sys-apps/hdparm/files/digest-hdparm-5.5-r1 b/sys-apps/hdparm/files/digest-hdparm-5.5-r1
new file mode 100644
index 000000000000..f3fa36d6a5d7
--- /dev/null
+++ b/sys-apps/hdparm/files/digest-hdparm-5.5-r1
@@ -0,0 +1 @@
+MD5 b3d65aa96d93fc08bc807fd1d9497c21 hdparm-5.5.tar.gz 38215
diff --git a/sys-apps/hdparm/files/hdparm-conf.d.3 b/sys-apps/hdparm/files/hdparm-conf.d.3
new file mode 100644
index 000000000000..f356708750a1
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-conf.d.3
@@ -0,0 +1,14 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/files/hdparm-conf.d.3,v 1.1 2004/08/01 14:43:43 lanius Exp $
+
+# You can either set hdparm arguments for each drive using hdX_args,
+# discX_args, cdromX_args and genericX_args, e.g.
+#
+# hda_args="-d1 -X66"
+# disc1_args"-d1"
+# cdrom0_args="-d1"
+
+# or, you can set hdparm options for ALL drives using all_args, e.g.
+#
+all_args="-d1"
diff --git a/sys-apps/hdparm/files/hdparm-init b/sys-apps/hdparm/files/hdparm-init
deleted file mode 100644
index 5729da360edc..000000000000
--- a/sys-apps/hdparm/files/hdparm-init
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/files/hdparm-init,v 1.4 2004/07/15 00:43:00 agriffis Exp $
-
-depend() {
- need localmount
-}
-
-start() {
- ebegin "Enabling DMA on IDE drives"
- /sbin/hdparm -d1 /dev/ide/hd/*u? &> /dev/null
- eend $?
-}
diff --git a/sys-apps/hdparm/files/hdparm-new-init b/sys-apps/hdparm/files/hdparm-init-2
index f4db73f4923b..ba9bd607492e 100644
--- a/sys-apps/hdparm/files/hdparm-new-init
+++ b/sys-apps/hdparm/files/hdparm-init-2
@@ -2,7 +2,7 @@
# Copyright 1999-2004 Gentoo Foundation
# Copyright 2003 Justin "Nagash" Jones
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/files/hdparm-new-init,v 1.5 2004/07/15 00:43:00 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/files/hdparm-init-2,v 1.1 2004/08/01 14:43:43 lanius Exp $
depend() {
need localmount
diff --git a/sys-apps/hdparm/files/hdparm-init-3 b/sys-apps/hdparm/files/hdparm-init-3
new file mode 100644
index 000000000000..68dff193d3e1
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-init-3
@@ -0,0 +1,132 @@
+#!/sbin/runscript
+# METHOD
+# ------
+# if /dev/ide exists, find all block devices beneath it named disc, cd, or
+# generic.
+#
+# for the disc and cd ones, if there is a a matching /dev/hdX symlink and
+# hdX_args is set in the config file, use hdX_args. otherwise, if there is a
+# matching /dev/discs/discX or /dev/cdroms/cdromX symlink, and discX_args or
+# cdromX_args is set in the config file, use discX_args / cdromX_args. finally,
+# if all_args is set in the config file, use that.
+#
+# for the generic ones, sort them and look for genericX_args in the config file
+# or use all_args.
+#
+# if /dev/ide does not exist, check the /dev/hdX entries, and see which ones
+# correspond to real devices by opening them for reading. then check hdX_args
+# and all_args in the config file.
+#
+# for each device considered, if no args are found in the config file, do not
+# run hdparm.
+
+
+depend() {
+ before bootmisc
+}
+
+
+do_hdparm() {
+ if [[ ${args:=$all_args} ]]
+ then
+ ebegin "Running hdparm on $device"
+ hdparm -q $args $device || ewarn "Failed to run hdparm on $device"
+ fi
+}
+
+
+start() {
+
+ ebegin 'Starting hdparm'
+
+ which hdparm &>/dev/null
+ eend $? 'hdparm executable not found'
+
+ if [ -e /dev/.devfsd ] || [ -e /dev/.udev ]
+ then
+
+ # devfs and udev system
+ for device in $(find /dev/ide -type b -name disc)
+ do
+
+ args=''
+
+ for alias in /dev/hd?
+ do
+ if [ $alias -ef $device ]
+ then
+ device=$alias
+ eval args=\${`basename $alias`_args}
+ break
+ fi
+ done
+
+ [ -z $args ] && for alias in /dev/discs/*
+ do
+ if [ $alias/disc -ef $device ]
+ then
+ device=$alias/disc
+ eval args=\${`basename $alias`_args}
+ break
+ fi
+ done
+
+ do_hdparm
+
+ done
+
+ for device in $(find /dev/ide -type b -name cd)
+ do
+
+ args=''
+
+ for alias in /dev/hd?
+ do
+ if [ $alias -ef $device ]
+ then
+ device=$alias
+ eval args=\${`basename $alias`_args}
+ break
+ fi
+ done
+
+ [ -z $args ] && for alias in /dev/cdroms/*
+ do
+ if [ $alias -ef $device ]
+ then
+ device=$alias
+ eval args=\${`basename $alias`_args}
+ break
+ fi
+ done
+
+ do_hdparm
+
+ done
+
+ let count=0
+ # of course, the sort approach would fail here if any of the
+ # host/bus/target/lun numbers reached 2 digits..
+ for device in $(find /dev/ide -type b -name generic | sort)
+ do
+ eval args=\${generic${count}_args}
+ do_hdparm
+ let count=count+1
+ done
+
+ else
+
+ # non-devfs system
+ for device in /dev/hd?
+ do
+ # check that the block device really exists
+ # by opening it for reading
+ if [ -b $device ] && ( : <$device ) 2>/dev/null
+ then
+ eval args=\${`basename $device`_args}
+ do_hdparm
+ fi
+ done
+
+ fi
+}
diff --git a/sys-apps/hdparm/hdparm-5.4.ebuild b/sys-apps/hdparm/hdparm-5.4.ebuild
index ff5ea4ee7980..d908361d0da5 100644
--- a/sys-apps/hdparm/hdparm-5.4.ebuild
+++ b/sys-apps/hdparm/hdparm-5.4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/hdparm-5.4.ebuild,v 1.14 2004/06/30 02:39:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/hdparm-5.4.ebuild,v 1.15 2004/08/01 14:43:43 lanius Exp $
inherit eutils
@@ -30,7 +30,7 @@ src_install() {
dosbin hdparm contrib/idectl || die
exeinto /etc/init.d
- newexe ${FILESDIR}/hdparm-new-init hdparm
+ newexe ${FILESDIR}/hdparm-init-2 hdparm
insinto /etc/conf.d
newins ${FILESDIR}/hdparm-conf.d hdparm
diff --git a/sys-apps/hdparm/hdparm-5.3-r2.ebuild b/sys-apps/hdparm/hdparm-5.5-r1.ebuild
index 6bc7b5239365..a144ec9d6654 100644
--- a/sys-apps/hdparm/hdparm-5.3-r2.ebuild
+++ b/sys-apps/hdparm/hdparm-5.5-r1.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2004 Gentoo Foundation
# 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.14 2004/06/30 02:39:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/hdparm-5.5-r1.ebuild,v 1.1 2004/08/01 14:43:43 lanius Exp $
+
+inherit gcc eutils
DESCRIPTION="Utility to change hard drive performance parameters"
HOMEPAGE="http://www.ibiblio.org/pub/Linux/system/hardware/"
@@ -8,11 +10,21 @@ SRC_URI="http://www.ibiblio.org/pub/Linux/system/hardware/${P}.tar.gz"
LICENSE="as-is"
SLOT="0"
-KEYWORDS="x86 ppc sparc alpha hppa amd64"
+KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~ppc64 ~s390"
IUSE=""
DEPEND="virtual/libc"
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${PN}-5.4-readahead_rename.patch
+ sed -i \
+ -e "/^CC/s:gcc:$(gcc-getCC):" \
+ -e "/^CFLAGS/s:-O2:${CFLAGS}:" \
+ Makefile || die
+}
+
src_compile() {
emake || die "compile error"
}
@@ -22,10 +34,10 @@ src_install() {
dosbin hdparm contrib/idectl || die
exeinto /etc/init.d
- newexe ${FILESDIR}/hdparm-new-init hdparm
+ newexe ${FILESDIR}/hdparm-init-3 hdparm
insinto /etc/conf.d
- newins ${FILESDIR}/hdparm-conf.d hdparm
+ newins ${FILESDIR}/hdparm-conf.d.2 hdparm
doman hdparm.8
dodoc hdparm.lsm Changelog README.acoustic hdparm-sysconfig
diff --git a/sys-apps/hdparm/hdparm-5.5.ebuild b/sys-apps/hdparm/hdparm-5.5.ebuild
index 2d54c5cc312e..8e3b6aad8052 100644
--- a/sys-apps/hdparm/hdparm-5.5.ebuild
+++ b/sys-apps/hdparm/hdparm-5.5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/hdparm-5.5.ebuild,v 1.8 2004/06/30 02:39:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/hdparm-5.5.ebuild,v 1.9 2004/08/01 14:43:43 lanius Exp $
inherit gcc eutils
@@ -34,7 +34,7 @@ src_install() {
dosbin hdparm contrib/idectl || die
exeinto /etc/init.d
- newexe ${FILESDIR}/hdparm-new-init hdparm
+ newexe ${FILESDIR}/hdparm-init-2 hdparm
insinto /etc/conf.d
newins ${FILESDIR}/hdparm-conf.d hdparm