summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-laptop/hdapsd/files')
-rw-r--r--app-laptop/hdapsd/files/digest-hdapsd-200604096
-rw-r--r--app-laptop/hdapsd/files/digest-hdapsd-20060409-r16
-rw-r--r--app-laptop/hdapsd/files/digest-hdapsd-200705243
-rw-r--r--app-laptop/hdapsd/files/hdaps-Z60m.patch10
-rw-r--r--app-laptop/hdapsd/files/hdapsd.conf11
-rw-r--r--app-laptop/hdapsd/files/hdapsd.init49
6 files changed, 85 insertions, 0 deletions
diff --git a/app-laptop/hdapsd/files/digest-hdapsd-20060409 b/app-laptop/hdapsd/files/digest-hdapsd-20060409
new file mode 100644
index 0000000..2e48b8e
--- /dev/null
+++ b/app-laptop/hdapsd/files/digest-hdapsd-20060409
@@ -0,0 +1,6 @@
+MD5 7ccac69e3c1a6134117f6cdb3e5deeef hdaps_protect-patches-1.tar.bz2 6179
+RMD160 5b173034eebbbee598e01d45e5e76e2859c0a829 hdaps_protect-patches-1.tar.bz2 6179
+SHA256 ab4192fa3a26497fe9fed63bfaedfebc74d288a85e7283b1bc338984be1133dd hdaps_protect-patches-1.tar.bz2 6179
+MD5 ef8bf36c67e2aee8914be178012b3861 hdapsd-20060409.c.bz2 5253
+RMD160 0b8d07a2612bd4888014913bd8810de664352bfb hdapsd-20060409.c.bz2 5253
+SHA256 e8e1788d485814cd294c33744b60265423d8971abf5ab50b037f05de2c710a21 hdapsd-20060409.c.bz2 5253
diff --git a/app-laptop/hdapsd/files/digest-hdapsd-20060409-r1 b/app-laptop/hdapsd/files/digest-hdapsd-20060409-r1
new file mode 100644
index 0000000..1b290cf
--- /dev/null
+++ b/app-laptop/hdapsd/files/digest-hdapsd-20060409-r1
@@ -0,0 +1,6 @@
+MD5 b7503b856a64783b8920a7c8d48eb3a3 hdaps_protect-patches-2.tar.bz2 10203
+RMD160 899a109b58b7aa4949012cd447275d2f3957951e hdaps_protect-patches-2.tar.bz2 10203
+SHA256 59cfe2535f3d11d1fe54d3c6acb3d2471c461af7770816aeec02411566d38c4b hdaps_protect-patches-2.tar.bz2 10203
+MD5 ef8bf36c67e2aee8914be178012b3861 hdapsd-20060409.c.bz2 5253
+RMD160 0b8d07a2612bd4888014913bd8810de664352bfb hdapsd-20060409.c.bz2 5253
+SHA256 e8e1788d485814cd294c33744b60265423d8971abf5ab50b037f05de2c710a21 hdapsd-20060409.c.bz2 5253
diff --git a/app-laptop/hdapsd/files/digest-hdapsd-20070524 b/app-laptop/hdapsd/files/digest-hdapsd-20070524
new file mode 100644
index 0000000..e36823c
--- /dev/null
+++ b/app-laptop/hdapsd/files/digest-hdapsd-20070524
@@ -0,0 +1,3 @@
+MD5 3080bea957b3e8eddae44b7163ca94c5 hdapsd-20070524.c.bz2 5617
+RMD160 5b5a634f0af6d9fc93c6f72ebeb538fb52ca3f86 hdapsd-20070524.c.bz2 5617
+SHA256 096d92702027df7293a17a0d312af44e7c946ab6bc864ef101d0159ed6871186 hdapsd-20070524.c.bz2 5617
diff --git a/app-laptop/hdapsd/files/hdaps-Z60m.patch b/app-laptop/hdapsd/files/hdaps-Z60m.patch
new file mode 100644
index 0000000..57c723c
--- /dev/null
+++ b/app-laptop/hdapsd/files/hdaps-Z60m.patch
@@ -0,0 +1,10 @@
+--- drivers/hwmon/hdaps.c 2006-06-26 09:37:31.131424200 +0100
++++ drivers/hwmon/hdaps.c 2006-06-26 09:39:49.000000000 +0100
+@@ -539,6 +539,7 @@
+ HDAPS_DMI_MATCH_NORMAL("ThinkPad X41 Tablet"),
+ HDAPS_DMI_MATCH_NORMAL("ThinkPad X41"),
+ HDAPS_DMI_MATCH_LENOVO("ThinkPad X60"),
++ HDAPS_DMI_MATCH_NORMAL("ThinkPad Z60m"),
+ { .ident = NULL }
+ };
+
diff --git a/app-laptop/hdapsd/files/hdapsd.conf b/app-laptop/hdapsd/files/hdapsd.conf
new file mode 100644
index 0000000..6221909
--- /dev/null
+++ b/app-laptop/hdapsd/files/hdapsd.conf
@@ -0,0 +1,11 @@
+# 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
new file mode 100644
index 0000000..a413490
--- /dev/null
+++ b/app-laptop/hdapsd/files/hdapsd.init
@@ -0,0 +1,49 @@
+#!/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 [[ ! -e /sys/block/${DISK}/queue/protect ]] ; 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/platorm/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 $?
+}