diff options
author | Christoph Junghans <ottxor@gentoo.org> | 2013-06-26 14:01:02 +0000 |
---|---|---|
committer | Christoph Junghans <ottxor@gentoo.org> | 2013-06-26 14:01:02 +0000 |
commit | 5e05a9b36168af2414ff18832c1f8b4b8067eb9e (patch) | |
tree | a7b856824e2bf1db6c92aca5499be75a3913ff0d /app-laptop/hdapsd | |
parent | app-text/pdfgrep: Drop old (diff) | |
download | gentoo-2-5e05a9b36168af2414ff18832c1f8b4b8067eb9e.tar.gz gentoo-2-5e05a9b36168af2414ff18832c1f8b4b8067eb9e.tar.bz2 gentoo-2-5e05a9b36168af2414ff18832c1f8b4b8067eb9e.zip |
remove old, fix posix compatibility (bug #474142#c4)
(Portage version: 2.2.0_alpha185/cvs/Linux x86_64, signed Manifest commit with key )
Diffstat (limited to 'app-laptop/hdapsd')
-rw-r--r-- | app-laptop/hdapsd/ChangeLog | 6 | ||||
-rw-r--r-- | app-laptop/hdapsd/files/hdapsd.conf | 11 | ||||
-rw-r--r-- | app-laptop/hdapsd/files/hdapsd.init | 55 | ||||
-rw-r--r-- | app-laptop/hdapsd/files/hdapsd.init.3 | 12 | ||||
-rw-r--r-- | app-laptop/hdapsd/hdapsd-20090401.ebuild | 48 |
5 files changed, 11 insertions, 121 deletions
diff --git a/app-laptop/hdapsd/ChangeLog b/app-laptop/hdapsd/ChangeLog index a1acb137dbbd..881fafce01ed 100644 --- a/app-laptop/hdapsd/ChangeLog +++ b/app-laptop/hdapsd/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-laptop/hdapsd # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/ChangeLog,v 1.24 2013/06/25 12:49:05 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/ChangeLog,v 1.25 2013/06/26 14:01:02 ottxor Exp $ + + 26 Jun 2013; <junghans@gentoo.org> -files/hdapsd.conf, -files/hdapsd.init, + -hdapsd-20090401.ebuild, files/hdapsd.init.3: + remove old, fix posix compatibility (bug #474142#c4) 25 Jun 2013; Agostino Sarubbo <ago@gentoo.org> hdapsd-20090401-r2.ebuild: Stable for amd64, wrt bug #474142 diff --git a/app-laptop/hdapsd/files/hdapsd.conf b/app-laptop/hdapsd/files/hdapsd.conf deleted file mode 100644 index 622190954c74..000000000000 --- a/app-laptop/hdapsd/files/hdapsd.conf +++ /dev/null @@ -1,11 +0,0 @@ -# The name of the disk device that hdapsd should monitor. -# Usually this is 'hda' or 'sda' the primary master. -DISK="sda" - -# hdapsd sensitivity -# The lower the threshold is the earlier -# the heads are parked when the laptop is shaked -THRESHOLD="10" - -# Set any extra options here, like -a for Adaptive mode -OPTIONS="-a" diff --git a/app-laptop/hdapsd/files/hdapsd.init b/app-laptop/hdapsd/files/hdapsd.init deleted file mode 100644 index a1b777ea73c2..000000000000 --- a/app-laptop/hdapsd/files/hdapsd.init +++ /dev/null @@ -1,55 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 - -depend() { - need localmount -} - -checkconfig() { - if [[ -z ${DISK} || -z ${THRESHOLD} ]] ; then - eerror "You should setup DISK and THRESHOLD in /etc/conf.d/hdapsd." - return 1 - fi - - if [ ! -b /dev/${DISK} ]; then - eerror "Could not find disk /dev/${DISK}!" - eerror "Adjust the DISK setting in /etc/conf.d/hdapsd" - return 1 - fi - - if [[ ! -e /sys/block/${DISK}/queue/protect ]] && [[ ! -e /sys/block/${DISK}/device/unload_heads ]] ; then - eerror "No protect entry for ${DISK}!" - eerror "Make sure your kernel is patched with the blk_freeze patch" - return 1 - fi - - # Load the tp_smapi module first - # This is not a requirement, but it helps hdapsd adaptive mode - if [[ ! -e /sys/devices/platform/smapi ]] ; then - modprobe tp_smapi 2>/dev/null - fi - - if [[ ! -d /sys/devices/platform/hdaps ]]; then - ebegin "Loading hdaps module" - modprobe hdaps - eend $? || return 1 - fi -} - -start() { - checkconfig || return 1 - - ebegin "Starting Hard Drive Active Protection System daemon" - start-stop-daemon --start --exec /usr/sbin/hdapsd \ - --pidfile /var/run/hdapsd.pid \ - -- -b -p -d "${DISK}" -s "${THRESHOLD}" ${OPTIONS} - eend $? -} - -stop() { - ebegin "Stopping Hard Drive Active Protection System daemon" - start-stop-daemon --stop --exec /usr/sbin/hdapsd \ - --pidfile /var/run/hdapsd.pid - eend $? -} diff --git a/app-laptop/hdapsd/files/hdapsd.init.3 b/app-laptop/hdapsd/files/hdapsd.init.3 index ef27368f7b5d..d2405232e246 100644 --- a/app-laptop/hdapsd/files/hdapsd.init.3 +++ b/app-laptop/hdapsd/files/hdapsd.init.3 @@ -1,5 +1,5 @@ #!/sbin/runscript -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 depend() { @@ -7,12 +7,12 @@ depend() { } checkconfig() { - if [[ -n ${DISK} ]]; then + if [ -n "${DISK}" ]; then ewarn "Please migrate DISK to DISKLIST in /etc/conf.d/hdapsd." DISKLIST=${DISK} fi - if [[ -z ${THRESHOLD} ]] ; then + if [ -z "${THRESHOLD}" ] ; then eerror "You should setup THRESHOLD in /etc/conf.d/hdapsd." return 1 fi @@ -25,7 +25,7 @@ checkconfig() { return 1 fi - if [[ ! -e /sys/block/${DISK}/queue/protect ]] && [[ ! -e /sys/block/${DISK}/device/unload_heads ]] ; then + if [ ! -e /sys/block/${DISK}/queue/protect ] && [ ! -e /sys/block/${DISK}/device/unload_heads ] ; then eerror "No protect entry for ${DISK}!" eerror "Make sure your kernel is patched with the blk_freeze patch" return 1 @@ -34,11 +34,11 @@ checkconfig() { # Load the tp_smapi module first # This is not a requirement, but it helps hdapsd adaptive mode - if [[ ! -e /sys/devices/platform/smapi ]] ; then + if [ ! -e /sys/devices/platform/smapi ] ; then modprobe tp_smapi 2>/dev/null fi - if [[ ! -d /sys/devices/platform/hdaps ]]; then + if [ ! -d /sys/devices/platform/hdaps ]; then ebegin "Loading hdaps module" modprobe hdaps eend $? || return 1 diff --git a/app-laptop/hdapsd/hdapsd-20090401.ebuild b/app-laptop/hdapsd/hdapsd-20090401.ebuild deleted file mode 100644 index f908544f1ba6..000000000000 --- a/app-laptop/hdapsd/hdapsd-20090401.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/hdapsd-20090401.ebuild,v 1.5 2011/05/04 15:44:37 tomka Exp $ - -EAPI=2 -inherit eutils linux-info toolchain-funcs - -DESCRIPTION="IBM ThinkPad Harddrive Active Protection disk head parking daemon" -HOMEPAGE="http://hdaps.sourceforge.net/" -SRC_URI="mirror://sourceforge/hdaps/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="" - -pkg_setup() { - # We require the hdaps module which can either come from kernel sources or - # from the tp_smapi package. - if ! has_version app-laptop/tp_smapi[hdaps]; then - CONFIG_CHECK="~SENSORS_HDAPS" - ERROR_SENSORS_HDAPS="${P} requires app-laptop/tp_smapi (with hdaps USE enabled) or support for CONFIG_SENSORS_HDAPS enabled" - linux-info_pkg_setup - fi -} - -src_install() { - emake DESTDIR="${D}" install || die - rm -rf "${D}"/usr/share/doc/hdapsd - dodoc ChangeLog README AUTHORS - newconfd "${FILESDIR}"/hdapsd.conf hdapsd - newinitd "${FILESDIR}"/hdapsd.init hdapsd -} - -pkg_postinst(){ - [[ -z $(ls ${ROOT}/sys/block/*/queue/protect 2>/dev/null) ]] && \ - [[ -z $(ls ${ROOT}/sys/block/*/device/unload_heads 2>/dev/null) ]] && \ - ewarn "Your kernel does NOT support shock protection. Kernel 2.6.28 and above is recommended!" - - if ! has_version app-laptop/tp_smapi[hdaps]; then - ewarn "Using the hdaps module provided by app-laptop/tp_smapi instead" - ewarn "of the in-kernel driver is strongly recommended!" - fi - - elog "You can change the default frequency by modifing /sys/devices/platform/hdaps/sampling_rate" - elog "You might need to enable shock protection manually by running " - elog " echo -1 > /sys/block/DEVICE/device/unload_heads" -} |