--- hdparm-8.9.orig/debian/hdparm.init +++ hdparm-8.9/debian/hdparm.init @@ -1,15 +1,27 @@ #!/bin/sh +### BEGIN INIT INFO +# Provides: hdparm +# Required-Start: mountdevsubfs +# Required-Stop: +# Should-Start: udev +# Default-Start: S +# Default-Stop: +# Short-Description: Tune IDE hard disks +### END INIT INFO + set -e . /lib/lsb/init-functions -. /etc/default/rcS -#In certian cases you may wish to run this script twice. Once at S07 -#and once later in the boot process. If you do this call /etc/init.d/hdparm -#again from rcS.d with a name such as S27hdparm.second. -# -#See /usr/share/doc/hdparm/README.Debian for more details. +# Defaults for configuration variables. +RAID_WORKAROUND=no + +# Source the defaults file. +[ -e /etc/default/hdparm ] && . /etc/default/hdparm + +raid_speed_limit_min= +raid_speed_limit_max= case "$0" in *hdparm) @@ -20,72 +32,70 @@ ;; esac -MYNAME="$0" - -report() -{ - echo "${MYNAME}: $*" -} - -report_error() -{ - echo "${MYNAME}: Error: $*" >&2 -} - -report_error_and_exit() -{ - report_error "$*. Exiting." - exit 1 -} - -case $1 in +case "$1" in start|restart|reload|force-reload) - ;; - stop) - exit 0 - ;; + UDEV=no + ;; + hotplug) + UDEV=yes + [ "$DEVNAME" ] || exit 1 + ;; + stop) + exit 0 + ;; *) - log_success_msg "Usage: $0 {stop|start|restart|reload|force-reload}" - exit 1 - ;; + log_failure_msg "Usage: $0 {stop|start|restart|reload|force-reload|hotplug}" >&2 + exit 3 + ;; esac -if grep -w -q "nohdparm" /proc/cmdline ; then - log_success_msg "Skipping setup of disc parameters as specified..." - exit 0 -fi +if [ "$FORCE_RUN" != 'yes' ]; then + if [ -e /proc/cmdline ]; then #linux only - future proofing against BSD and Hurd :) + if grep -wq "nohdparm" /proc/cmdline ; then + log_warning_msg "Skipping setup of disc parameters." + exit 0 + fi + fi -raidstat=OK -if [ -e /proc/mdstat ]; then - if grep -iq resync /proc/mdstat; then - raidstat=RESYNC + raidstat=OK + if [ -e /proc/mdstat ]; then + if egrep -iq "resync|repair|recover|check" /proc/mdstat; then + raidstat=RESYNC + fi + elif [ -e /proc/rd/status ]; then + raidstat=`cat /proc/rd/status` fi -elif [ -e /proc/rd/status ]; then - raidstat=`cat /proc/rd/status` -fi -if ! [ "$raidstat" = 'OK' ]; then - log_warning_msg "RAID status not OK. Exiting." - exit 0 + if ! [ "$raidstat" = 'OK' ] && [ "$RAID_WORKAROUND" != "yes" ]; then + log_failure_msg "RAID status not OK. Exiting." + exit 0 + fi fi -log_begin_msg "Setting disc parameters..." - -DISC= -DEFAULT= -OPTIONS= -DEF_QUIET= -OPT_QUIET= +slow_down_raid_sync() +{ + if [ -f /proc/sys/dev/raid/speed_limit_min ]; then + raid_speed_limit_min=`cat /proc/sys/dev/raid/speed_limit_min` + echo 0 >/proc/sys/dev/raid/speed_limit_min + fi + if [ -f /proc/sys/dev/raid/speed_limit_max ]; then + raid_speed_limit_max=`cat /proc/sys/dev/raid/speed_limit_max` + echo 0 >/proc/sys/dev/raid/speed_limit_max + fi + sleep 2 +} -# set_option() adds $1 to the $OPTIONS list if in a disk stanza -# and adds $1 to the $DEFAULT list if not in a disk stanza -# -# the block beginning: -# if test x${i%${i#??}} != x${1%${1#??}}; then -# checks to see if $1 is already in the list and -# if so removes the first instance +undo_slow_down_raid_sync() +{ + if [ -f /proc/sys/dev/raid/speed_limit_min ] && [ "x$raid_speed_limit_min" != "x" ]; then + echo $raid_speed_limit_min >/proc/sys/dev/raid/speed_limit_min + fi + if [ -f /proc/sys/dev/raid/speed_limit_max ] && [ "x$raid_speed_limit_max" != "x" ]; then + echo $raid_speed_limit_max >/proc/sys/dev/raid/speed_limit_max + fi +} -set_option() +set_option() { if test -n "$DISC"; then NEW_OPT= @@ -110,168 +120,291 @@ fi } -eval_value() +eval_value() { case $1 in - off|0) + off|0) set_option "$2"0 ;; - on|1) + on|1) set_option "$2"1 ;; - *) - return 1 + *) + log_failure_msg "Unknown Value for $2: $1" + exit 1 ;; esac } +WAS_RUN=0 + +# Turn off RAID synchronisation if needed and asked for. +if [ "$raidstat" != 'OK' ] && [ "$RAID_WORKAROUND" = "yes" ]; then + slow_down_raid_sync +fi + # Get blocks as far as the drive's write cache. /bin/sync -# Set options for a group of disks in /etc/default/hdparm -[ -e /etc/default/hdparm ] && . /etc/default/hdparm +[ "$UDEV" = 'yes' ] || log_daemon_msg "Setting parameters of disc" -if [ -n "$harddisks" -a -n "$hdparm_opts" ]; then - for drive in $harddisks; do - /sbin/hdparm -q -f $drive - hdparm -q $hdparm_opts -q $drive - [ "$VERBOSE" != no ] && log_success_msg "Found enabled disk: $drive" - done -fi +DISC= +DEFAULT= +OPTIONS= +DEF_QUIET= +OPT_QUIET= -egrep -v '^[[:space:]]*(#|$)' /etc/hdparm.conf | while read KEY SEP VALUE; do - if [ "$NEXT_LINE" != 'go' ]; then - case $SEP in - '{') - case $KEY in - command_line) - NEXT_LINE=go - unset DISC - unset OPTIONS - unset OPT_QUIET - ;; - *) - DISC=$KEY - OPTIONS=$DEFAULT - OPT_QUIET=$DEF_QUIET - WAS_RUN=0 - ;; - esac - ;; - =) - case $KEY in - read_ahead_sect) - set_option -a$VALUE - ;; - lookahead) - eval_value $VALUE -A - ;; - bus) - eval_value $VALUE -b - ;; - apm) - set_option -B$VALUE - ;; - io32_support) - set_option -c$VALUE - ;; - dma) - eval_value $VALUE -d - ;; - defect_mana) - eval_value $VALUE -D - ;; - cd_speed) - set_option -E$VALUE - ;; - mult_sect_io) - set_option -m$VALUE - ;; - prefetch_sect) - set_option -P$VALUE - ;; - read_only) - eval_value $VALUE -r - ;; - spindown_time) - set_option -S$VALUE - ;; - interrupt_unmask) - eval_value $VALUE -u - ;; - write_cache) - eval_value $VALUE -W - ;; - transfer_mode) - set_option -X$VALUE - ;; - acoustic_management) - set_option -M$VALUE - ;; - keep_settings_over_reset) - eval_value $VALUE -k +egrep -v '^[[:space:]]*(#|$)' /etc/hdparm.conf | +{ + while read KEY SEP VALUE; do + if [ "$NEXT_LINE" != 'go' ]; then + case $SEP in + '{') + case $KEY in + command_line) + NEXT_LINE=go + unset DISC + unset OPTIONS + unset OPT_QUIET + if [ "$UDEV" = 'yes' ]; then + IN_BLOCK=0 + fi + ;; + *) + DISC=$KEY + OPTIONS=$DEFAULT + OPT_QUIET=$DEF_QUIET + WAS_RUN=0 + if [ "$UDEV" = 'yes' ]; then + if [ "$DISC" = "$DEVNAME" ]; then + IN_BLOCK=1 + else + IN_BLOCK=0 + fi + fi + ;; + esac ;; - keep_features_over_reset) - eval_value $VALUE -K + =) + case $KEY in + read_ahead_sect) + set_option -a$VALUE + ;; + lookahead) + eval_value $VALUE -A + ;; + bus) + eval_value $VALUE -b + ;; + apm) + set_option -B$VALUE + ;; + io32_support) + set_option -c$VALUE + ;; + dma) + eval_value $VALUE -d + ;; + defect_mana) + eval_value $VALUE -D + ;; + cd_speed) + set_option -E$VALUE + ;; + mult_sect_io) + set_option -m$VALUE + ;; + prefetch_sect) + set_option -P$VALUE + ;; + read_only) + eval_value $VALUE -r + ;; + spindown_time) + case "$VALUE" in + *[hms]) + case "$VALUE" in + *h) + time=$((${VALUE%h} * 3600)) + ;; + *m) + time=$((${VALUE%m} * 60)) + ;; + *s) + time=${VALUE%s} + ;; + esac + if [ $time -lt 1260 ]; then # up to 21 minutes + new_VALUE=$(($time / 5)) + if [ $new_VALUE -gt 240 ]; then + new_VALUE=240 + fi + if [ $(($new_VALUE * 5)) -ne $time ]; then + log_warning_msg "$VALUE not possible, using $(($new_VALUE * 5)) seconds" + fi + VALUE=$new_VALUE + elif [ $time -lt 1800 ]; then + if [ $time -ne 1260 ]; then + log_warning_msg "$VALUE not possible, using 21 minutes" + fi + VALUE=252 + else + new_time=$(($time / 1800)) + if [ $new_time -gt 11 ]; then + new_time=11 + fi + if [ $((new_time * 1800)) -ne $time ]; then + log_warning_msg "$VALUE not possible, using $(($new_time * 30)) minutes" + fi + VALUE=$((new_time + 240)) + fi + ;; + esac + set_option -S$VALUE + ;; + poweron_standby) + eval_value $VALUE -s + ;; + interrupt_unmask) + eval_value $VALUE -u + ;; + write_cache) + eval_value $VALUE -W + ;; + transfer_mode) + set_option -X$VALUE + ;; + acoustic_management) + set_option -M$VALUE + ;; + keep_settings_over_reset) + eval_value $VALUE -k + ;; + keep_features_over_reset) + eval_value $VALUE -K + ;; + chipset_pio_mode) + set_option -p$VALUE + ;; + security_unlock) + set_option --security-unlock $VALUE + ;; + security_pass) + set_option --security-set-pass $VALUE + ;; + security_disable) + set_option --security-disable $VALUE + ;; + user-master) + set_option --user-master $VALUE + ;; + security_mode) + set_option --security-mode $VALUE + ;; + ROOTFS) + ROOTFS=$VALUE + ;; + *) + log_failure_msg "Unknown option $KEY" + undo_slow_down_raid_sync + exit 1 + ;; + esac ;; - chipset_pio_mode) - set_option -p$VALUE + "") + case $KEY in + '}') + if [ -z "$DISC" ] && [ "$WAS_RUN" != '1' ]; then + log_failure_msg "No disk enabled. Exiting" + undo_slow_down_raid_sync + exit 1 + fi + if [ -n "$OPTIONS" ] && [ -b "$DISC" ]; then + if [ -n "$ROOTFS" ]; then + if [ "$FIRST" = 'yes' ] && [ "$DISC" != "$ROOTFS" ]; then + continue + fi + if [ "$FIRST" = 'no' ] && [ "$DISC" = "$ROOTFS" ]; then + continue + fi + fi + ret=0 + if [ "$UDEV" = 'yes' ] && [ "$IN_BLOCK" = 1 ]; then + # Flush the drive's internal write cache to the disk. + /sbin/hdparm -q -f $DISC 2>/dev/null || ret=$? + /sbin/hdparm $OPTIONS $DISC 2>/dev/null || ret=$? + if [ "$VERBOSE" = 'yes' ]; then + log_progress_msg " $DISC" + log_end_msg $ret || true + fi + elif [ "$UDEV" = 'no' ]; then + /sbin/hdparm -q -f $DISC 2>/dev/null || ret=$? + /sbin/hdparm $OPTIONS $DISC 2>/dev/null || ret=$? + WAS_RUN=1 + log_progress_msg " $DISC" + log_end_msg $ret || true + fi + fi + ;; + quiet) + if [ -n "$DISC" ]; then + OPT_QUIET=-q + else + DEF_QUIET=-q + fi + ;; + standby) + set_option -y + ;; + sleep) + set_option -Y + ;; + disable_seagate) + set_option -Z + ;; + security_freeze) + set_option --security-freeze + ;; + *) + log_failure_msg "unknown option $KEY" + undo_slow_down_raid_sync + exit 1 + ;; + esac ;; - *) - log_failure_msg "Unknown option $KEY!" - exit 1 - ;; - esac - ;; - "") - case $KEY in - }) - if [ -z "$DISC" ]; then - if [ "$WAS_RUN" != 1 ]; then - log_failure_msg "No disk enabled. Exiting..." - exit 1 - fi - fi - if [ -n "$OPTIONS" ]; then - # Flush the drive's internal write cache to the disk. - /sbin/hdparm -q -f $DISC - - /sbin/hdparm $OPTIONS $DISC - [ "$VERBOSE" != no ] && log_success_msg "Found enabled disk: $DISC" - fi - ;; - quiet) - if [ -n "$DISC" ]; then - OPT_QUIET=-q - else - DEF_QUIET=-q - fi - ;; - standby) - set_option -y - ;; - sleep) - set_option -Y - ;; - disable_seagate) - set_option -Z - ;; - *) - log_failure_msg "Unknown option $KEY!" - exit 1 - ;; - esac - ;; - *) - log_failure_msg "Unknown separator $SEP!" - exit 1 - ;; - esac -else - $KEY $SEP $VALUE - NEXT_LINE=no-go - WAS_RUN=1 + *) + log_failure_msg "unknown separator $SEP" + undo_slow_down_raid_sync + exit 1 + ;; + esac + else + $KEY $SEP $VALUE + NEXT_LINE=no-go + WAS_RUN=1 + fi + done + + if [ -n "$harddisks" ] && [ -n "$hdparm_opts" ] && [ "$UDEV" = 'no' ]; then + ret=0 + for drive in $harddisks; do + WAS_RUN=1 + /sbin/hdparm -q -f $drive 2>/dev/null|| ret=$? + /sbin/hdparm -q $hdparm_opts -q $drive 2>/dev/null|| ret=$? + log_progress_msg "$drive " + done + log_end_msg $ret || true + fi + + if [ "$UDEV" = 'no' -a "$WAS_RUN" = 0 ]; then + log_progress_msg "(none)" + log_end_msg 0 + fi +} + +# Turn back on RAID synchronisation if we turned it off. +if [ "$raidstat" != 'OK' ] && [ "$RAID_WORKAROUND" = "yes" ]; then + undo_slow_down_raid_sync fi -done -log_end_msg 0 +exit 0 --- hdparm-8.9.orig/debian/hdparm.conf +++ hdparm-8.9/debian/hdparm.conf @@ -57,6 +57,8 @@ #prefetch_sect = 12 # -r read-only flag for device #read_only = off +# -s Turn on/off power on in standby mode +#poweron_standby = off # -S standby (spindown) timeout for the drive #spindown_time = 24 # -u interrupt-unmask flag for the drive @@ -75,6 +77,18 @@ #acoustic_management # -p Set the chipset PIO mode # chipset_pio_mode +# --security-freeze Freeze the drive's security status +# security_freeze +# --security-unlock Unlock the drive's security +# security_unlock = PWD +# --security-set-pass Set security password +# security_pass = password +# --security-disable Disable drive locking +# security_disable +# --user-master Select password to use +# user-master = u +# --security-mode Set the security mode +# security_mode = h # Root file systems. Please see README.Debian for details # ROOTFS = /dev/hda --- hdparm-8.9.orig/debian/hdparm-udeb.install +++ hdparm-8.9/debian/hdparm-udeb.install @@ -0,0 +1 @@ +debian/tmp/sbin/hdparm --- hdparm-8.9.orig/debian/changelog +++ hdparm-8.9/debian/changelog @@ -0,0 +1,824 @@ +hdparm (8.9-2ubuntu1) jaunty; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + - debian/control: Do not depend on lsb-base + + -- Michael Vogt Mon, 10 Nov 2008 14:02:31 +0100 + +hdparm (8.9-2) unstable; urgency=low + + * Remove stale stop links (closes: #497903) + + -- Stephen Gran Fri, 05 Sep 2008 11:23:20 +0100 + +hdparm (8.9-1ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + - debian/control: Do not depend on lsb-base + + -- Michael Vogt Thu, 19 Jun 2008 10:40:06 +0200 + +hdparm (8.9-1) unstable; urgency=low + + * New upstream version + * Update standars version to 3.8.0 (no changes) + + -- Stephen Gran Tue, 17 Jun 2008 19:08:10 +0100 + +hdparm (8.8-1) unstable; urgency=low + + * New upstream version + - Document that security-* switches are standalone (closes: #422341) + + -- Stephen Gran Wed, 11 Jun 2008 23:36:59 +0100 + +hdparm (8.7-1) unstable; urgency=low + + * New upstream release + * Fixed incorrect LSB header Default-Stop (closes: #476110) + + -- Stephen Gran Tue, 03 Jun 2008 00:36:06 +0100 + +hdparm (8.6-1ubuntu1) hardy; urgency=low + + * Merge from Debian unstable (LP: #203736). Remaining Ubuntu changes: + - remove init script, install udev rules instead + - set Ubuntu maintainer address. + - debian/control: Do not depend on lsb-base + * Fixes "udev rules only for hd[a-z], not sd[a-z]" (LP: #156893) + * Remove hdparm init script and make it not re-appear in next merges + - debian/rules: add "--onlyscripts" to DEB_DH_INSTALLINIT_ARGS, so that the + init script does not get installed + - debian/preinst: bump version in rm_conffile call + + -- Daniel Hahler Fri, 28 Mar 2008 21:44:38 +0100 + +hdparm (8.6-1) unstable; urgency=low + + * New upstream version + * Udev rule can also match for sata devices (closes: #471401) + + -- Stephen Gran Tue, 18 Mar 2008 01:06:37 +0000 + +hdparm (8.3-1) unstable; urgency=low + + * New upstream release + * easier config of spindown time (closes: #462766) + * Update Standards-Version (no changes) + + -- Stephen Gran Tue, 19 Feb 2008 22:39:32 +0000 + +hdparm (7.7-1ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + - set Ubuntu maintainer address. + + -- Michael Vogt Thu, 15 Nov 2007 12:39:58 +0100 + +hdparm (7.7-1) unstable; urgency=low + + * New upstream version + + -- Stephen Gran Sat, 11 Aug 2007 12:35:12 +0100 + +hdparm (7.6-1) unstable; urgency=low + + * New upstream version + * Update conffile handling in preinst + + -- Stephen Gran Sun, 15 Jul 2007 15:50:24 +0100 + +hdparm (7.5-1ubuntu1) gutsy; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + - set Ubuntu maintainer address. + + -- Michael Vogt Thu, 14 Jun 2007 09:54:59 +0200 + +hdparm (7.5-1) unstable; urgency=low + + * New upstream version + + -- Stephen Gran Wed, 06 Jun 2007 21:13:36 +0100 + +hdparm (7.3-1) unstable; urgency=low + + * New upstream version + - partial fix for #423186, rest patched, so (closes: #423186) + * Stop installing useless stop links in rc0 and rc6 (closes: #422795) + + -- Stephen Gran Thu, 31 May 2007 02:34:11 +0100 + +hdparm (7.1-2ubuntu1) gutsy; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + - set Ubuntu maintainer address. + + -- Michael Vogt Mon, 21 May 2007 08:47:38 +0200 + +hdparm (7.1-2) unstable; urgency=low + + * Don't ship a binary in contrib/ (even though upstream puts it in the + tarball) + + -- Stephen Gran Sun, 29 Apr 2007 03:33:05 +0100 + +hdparm (7.1-1) unstable; urgency=low + + * New upstream version + * Add debian/patches/40_hdparm_no_strip.dpatch to keep build system from + stripping hdparm binary before dh_strip can get to it. + + -- Stephen Gran Sun, 29 Apr 2007 03:02:39 +0100 + +hdparm (6.9-2) unstable; urgency=low + + * Typo fix in manpage (closes: #396809) + * Better explain get/set options (closes: #397792) + + -- Stephen Gran Sat, 17 Feb 2007 03:30:06 +0000 + +hdparm (6.9-1ubuntu2) feisty; urgency=low + + * Rebuild for changes in the amd64 toolchain. + * Set Ubuntu maintainer address. + + -- Matthias Klose Mon, 5 Mar 2007 01:18:04 +0000 + +hdparm (6.9-1ubuntu1) feisty; urgency=low + + * Merge from debian unstable, remaining changes: + - remove init script, install udev rules instead + + * Update udev script from init script + + -- Scott James Remnant Mon, 27 Nov 2006 14:14:39 +0000 + +hdparm (6.9-1) unstable; urgency=low + + * New upstream version + * Add new -s option to init script, conf file, and manpage + + -- Stephen Gran Wed, 25 Oct 2006 16:24:22 +0100 + +hdparm (6.8-1) unstable; urgency=low + + * New upstream version + + -- Stephen Gran Mon, 16 Oct 2006 18:14:36 +0100 + +hdparm (6.7-1) unstable; urgency=low + + * New upstream version + * Fix override disparity for -dbg package + * Versioned Build-Dep on dpkg-dev since it now uses ${binary:Version} + + -- Stephen Gran Thu, 5 Oct 2006 22:37:59 +0100 + +hdparm (6.6-5) unstable; urgency=low + + * Make -C actually try a second time (closes: #390079) + + -- Stephen Gran Sat, 30 Sep 2006 15:08:01 +0100 + +hdparm (6.6-4) unstable; urgency=low + + * hdparm-dbg should Depend on hdparm, how about? + + -- Stephen Gran Thu, 28 Sep 2006 11:06:31 +0100 + +hdparm (6.6-3) unstable; urgency=low + + * s/mountvirtfs/mountdevsubfs/ in init script (closes: #386340) + * Some init dependency tuning + * Apply patch from Norbert Buchmuller to make it safer + to run hdparm on a degraded software raid array (closes: #366333) + * Split out the old unformatted changelog entries to quiet lintian + + -- Stephen Gran Tue, 19 Sep 2006 00:44:08 +0100 + +hdparm (6.6-2) unstable; urgency=low + + * Add -dbg package + This requires incrementing the versioned dep on debhelper + * Increment Standards-Version to 3.7.2 (no changes) + + -- Stephen Gran Thu, 18 May 2006 23:59:56 +0100 + +hdparm (6.6-1ubuntu3) edgy; urgency=low + + * Remove the init script again. + + -- Scott James Remnant Thu, 20 Jul 2006 23:33:21 +0100 + +hdparm (6.6-1ubuntu2) edgy; urgency=low + + * Repair CDBS damage ... silently enabling features depending on the + filename of files that may have existed before is BAD, OKAY? + + -- Scott James Remnant Mon, 3 Jul 2006 23:03:13 +0100 + +hdparm (6.6-1ubuntu1) edgy; urgency=low + + [ Ongoing Merge Process ] + * Merge from debian unstable. + + [ Scott James Remnant ] + * Drop conffile move now dapper is released. + + -- Scott James Remnant Wed, 28 Jun 2006 23:44:49 +0100 + +hdparm (6.6-1) unstable; urgency=low + + * New upstream release + * man page fixups for -a (closes: #362670) + * Change to using comparison (==) rather than assignment (=) operators in + hdparm's udev rules. + * Stop printing nulls (closes: #363132) + * Add APM/ACPI discussion to README.Debian (closes: #327442) + + -- Stephen Gran Tue, 18 Apr 2006 13:28:33 +0100 + +hdparm (6.3-3ubuntu1) dapper; urgency=low + + * Resynchronise with Debian. + * Drop init script completely, udev will run the right magic for each + new block device anyway. + + -- Scott James Remnant Thu, 15 Dec 2005 01:56:46 +0000 + +hdparm (6.3-3) unstable; urgency=low + + * Init script fixup: s/_/-/ (closes: #340685) + + -- Stephen Gran Fri, 25 Nov 2005 09:15:46 +0000 + +hdparm (6.3-2) unstable; urgency=low + + * Brown paper bag release - add dpatch to B-D (closes:#340595) + + -- Stephen Gran Thu, 24 Nov 2005 13:21:52 +0000 + +hdparm (6.3-1) unstable; urgency=low + + * New Upstream Version (closes: #340171) + * Init dependency information added (closes: #335309) + * Add support for new user-master option to init script, and document same + * Switch to dpatch, and start adding tiny patches there + + -- Stephen Gran Mon, 21 Nov 2005 23:44:43 +0000 + +hdparm (6.1-7) unstable; urgency=low + + * Make eval_value fail if unknown value passed to it (closes: #329443) + * Get rid of deprecated dev.d/ file (closes: #329450) + * Add /etc/udev/rules.d/ to package (closes: #329731) + + -- Stephen Gran Sat, 24 Sep 2005 01:03:51 +0100 + +hdparm (6.1-7ubuntu2) dapper; urgency=low + + * Fix incorrect syntax in hdparm.rules file. + * Install hdparm.rules as /etc/udev/rules.d/85-hdparm.rules to match + new udev packages; move file if customised in ubuntu1. + + -- Scott James Remnant Fri, 18 Nov 2005 10:03:15 +0000 + +hdparm (6.1-7ubuntu1) dapper; urgency=low + + * Resynchronise with Debian. + (Yes, really, me; not any of those imposters!) + - Kept versioned-dep on lsb-base. + - Kept include of /etc/default/rcS in hdparm.init as we check VERBOSE, + I'm not sure why Debian don't do that. + - Merge both sets of init script changes to roughly produce the same + effect, less logging than Debian but with combined init and hotplug + script. + * Dropped postrm and postinst, instead install hdparm.rules directly into + /etc/udev/rules.d, we have no need to mess about with symlinks. + * Dropped support for /etc/default/hdparm as it doesn't really work with + udev anyway, and there should only be one way to do things, damnit. + + -- Scott James Remnant Tue, 08 Nov 2005 07:20:28 +0000 + +hdparm (6.1-6) unstable; urgency=low + + * Migrate from dev.d to udev/hdparm.rules (closes: #329026) + * remerge manpage patch for -M (closes: #325237) + + -- Stephen Gran Mon, 19 Sep 2005 08:19:27 +0100 + +hdparm (6.1-5) unstable; urgency=low + + * Change udev script name to end in .dev (hmm, really should have + investigated that more) (closes: #322636) + + -- Stephen Gran Fri, 12 Aug 2005 08:56:00 -0400 + +hdparm (6.1-4) unstable; urgency=low + + * Grr, I _would_ have had a working solution, if only I actually installed + all the files. + + -- Stephen Gran Thu, 11 Aug 2005 09:57:28 -0400 + +hdparm (6.1-3) unstable; urgency=low + + * Finally, I think I have a working udev method (much thanks to Ubuntu for + doing rather a lot of the work getting it there) + (closes: #274109, #312949) + * security-freeze support for init script (closes: #317675) + * hdparm.conf manpage written and included (closes: #319928) + + -- Stephen Gran Wed, 10 Aug 2005 15:26:36 -0400 + +hdparm (6.1-2) unstable; urgency=low + + * Typo fixups in /etc/default/hdparm (closes: #310517) + + -- Stephen Gran Tue, 24 May 2005 10:08:42 -0400 + +hdparm (6.1-1ubuntu2) breezy; urgency=low + + * Fix the hdparm.dev script to only execute hdparm for the block device + being created, rather than for every block device configured in the file. + This prevents an hdparm storm bringing down the machine. (Ubuntu: #16433) + + -- Scott James Remnant Tue, 27 Sep 2005 21:00:19 +0100 + +hdparm (6.1-1ubuntu1) breezy; urgency=low + + * Resynchronise with Debian, resolving merge conflicts. + + -- Adam Conrad Thu, 21 Apr 2005 09:33:45 +0000 + +hdparm (6.1-1) unstable; urgency=low + + * New upstream version + + -- Stephen Gran Mon, 18 Apr 2005 14:40:21 -0400 + +hdparm (6.1-7) unstable; urgency=low + + * Make eval_value fail if unknown value passed to it (closes: #329443) + * Get rid of deprecated dev.d/ file (closes: #329450) + * Add /etc/udev/rules.d/ to package (closes: #329731) + + -- Stephen Gran Sat, 24 Sep 2005 01:03:51 +0100 + +hdparm (6.1-6) unstable; urgency=low + + * Migrate from dev.d to udev/hdparm.rules (closes: #329026) + * remerge manpage patch for -M (closes: #325237) + + -- Stephen Gran Mon, 19 Sep 2005 08:19:27 +0100 + +hdparm (6.1-5) unstable; urgency=low + + * Change udev script name to end in .dev (hmm, really should have + investigated that more) (closes: #322636) + + -- Stephen Gran Fri, 12 Aug 2005 08:56:00 -0400 + +hdparm (6.1-4) unstable; urgency=low + + * Grr, I _would_ have had a working solution, if only I actually installed + all the files. + + -- Stephen Gran Thu, 11 Aug 2005 09:57:28 -0400 + +hdparm (6.1-3) unstable; urgency=low + + * Finally, I think I have a working udev method (much thanks to Ubuntu for + doing rather a lot of the work getting it there) + (closes: #274109, #312949) + * security-freeze support for init script (closes: #317675) + * hdparm.conf manpage written and included (closes: #319928) + + -- Stephen Gran Wed, 10 Aug 2005 15:26:36 -0400 + +hdparm (6.1-2) unstable; urgency=low + + * Typo fixups in /etc/default/hdparm (closes: #310517) + + -- Stephen Gran Tue, 24 May 2005 10:08:42 -0400 + +hdparm (6.1-1) unstable; urgency=low + + * New upstream version + + -- Stephen Gran Mon, 18 Apr 2005 14:40:21 -0400 + +hdparm (6.0-1) unstable; urgency=low + + * New upstream version + - Includes WIN_SECURITY_FREEZE_LOCK (closes: #302774) + * Allow multiple disks to be set up at once in /etc/default/hdparm + (closes: #296368) + + -- Stephen Gran Sat, 16 Apr 2005 12:36:14 -0400 + +hdparm (5.9-4ubuntu1) breezy; urgency=low + + * Resynchronise with Debian. + + -- Michael Vogt Fri, 15 Apr 2005 15:30:28 +0200 + +hdparm (5.9-4) unstable; urgency=low + + * Allow overriding of (rather simple minded) built-in safety checks + in init script (closes: #299330) + * Patch to output sectors instead of bytes on kernels that support + BLKGETSIZE64 (closes: #299109) + * Reorganize README.Debian, and better document the init script (hopefully) + * Add documentation to init script and conf file, and make indenting more + readable in init script (closes: #299440) + + -- Stephen Gran Mon, 14 Mar 2005 06:05:55 -0500 + +hdparm (5.9-3) unstable; urgency=low + + * Don't skip drives in hdparm.init if $ROOTFS is unset (closes: #296364) + + -- Stephen Gran Mon, 21 Feb 2005 22:11:40 -0500 + +hdparm (5.9-2) unstable; urgency=low + + * Readability fixup in hdparm.init (closes: #294761) (thanks Thomas Hood + ) + * Test for existance of device before running hdparm on it. This doesn't + really fix the problem of things like udev creating the device files so + slowly, but it allows the init script to run to completion, instead of + bailing due to set -e (closes: #249446) + * Set up the infrastructure for a 2 stage call at boot time. Unfortunately, + the admin will have to do a little work themselves to configure this, but + doing it automagically appears impossible in all situations, so I will not + push it much further. (closes: #250232, #290629) + + -- Stephen Gran Thu, 17 Feb 2005 22:00:33 -0500 + +hdparm (5.9-1) unstable; urgency=low + + * New upstream version + - fixes -W switch (closes: #293378) + + -- Stephen Gran Fri, 4 Feb 2005 08:56:57 -0500 + +hdparm (5.8-1ubuntu4) hoary; urgency=low + + * Force the /etc/dev.d/block/hdparm.dev script to be executable + if upgrading from a version older than this one. dpkg won't + touch the mode on this file. + + -- Jeff Bailey Mon, 21 Mar 2005 07:15:54 -0500 + +hdparm (5.8-1ubuntu3) hoary; urgency=low + + * ensure that the hdparm dev script is +x (Ubuntu: #7829) + + -- Thom May Sat, 19 Mar 2005 22:46:43 +0000 + +hdparm (5.8-1ubuntu2) hoary; urgency=low + + * Add udev script to run hdparm on newly created devices. (Ubuntu: #4356) + + -- Thom May Mon, 7 Feb 2005 12:50:01 +0000 + +hdparm (5.8-1ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + + -- Scott James Remnant Sat, 27 Nov 2004 12:47:14 +0000 + +hdparm (5.8-1) unstable; urgency=low + + * New Upstream version + - -h output now goes to stdout rather than stderr + (closes: #270510) + * Mention config file in manpage (closes: #272641) + + -- Stephen Gran Fri, 26 Nov 2004 11:57:13 -0500 + +hdparm (5.7-1ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + + -- Thom May Wed, 27 Oct 2004 21:40:43 +0100 + +hdparm (5.7-1) unstable; urgency=low + + * New upstream release + - fixes endian problems (segfault with -i) (closes: #268725) + * Stop shipping empty rcS.d (why did I do that?) (closes: #270377) + + -- Stephen Gran Sun, 12 Sep 2004 14:00:36 -0400 + +hdparm (5.6-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream release, blessed by Stephen Gran, original maintainer. This + new version allows to set up parameters on IDE disks supported by the new + libata kernel interface, that sees them as SCSI disks. hdparm prior to 5.6 + refuse to set up parameters on SCSI disks (closes: #266903). + + -- David Martínez Moreno Fri, 20 Aug 2004 16:05:19 +0200 + +hdparm (5.5-7) unstable; urgency=low + + * Get rid of .commands in source + + -- Stephen Gran Tue, 17 Aug 2004 12:14:24 -0400 + +hdparm (5.5-6) unstable; urgency=low + + * The God, I hate when I do that release + * Revert some changes that are destined for an unfinished feature, and would + just break things now. + + -- Stephen Gran Tue, 17 Aug 2004 12:08:41 -0400 + +hdparm (5.5-5) unstable; urgency=low + + * New conf file option -p (Thanks Sebastian Kuzminsky ) + * conf file also now allows for straight command line syntax - read + comments in hdparm.conf for details + * Add watch file + * Add udeb (closes: #265969) (Thanks Colin Watson for + patch) + + -- Stephen Gran Sun, 15 Aug 2004 22:48:29 -0400 + +hdparm (5.5-4ubuntu3) warty; urgency=low + + * Added versioned depend on lsb-base + + -- Nathaniel McCallum Fri, 3 Sep 2004 14:54:30 -0400 + +hdparm (5.5-4ubuntu2) warty; urgency=low + + * debian/hdparm.init: pretty initscript + + -- Nathaniel McCallum Fri, 3 Sep 2004 10:46:32 -0400 + +hdparm (5.5-4ubuntu1) warty; urgency=low + + * Create a udeb so that we can tune disk (especially CD-ROM) parameters in + d-i. + + -- Colin Watson Mon, 16 Aug 2004 00:21:30 +0100 + +hdparm (5.5-4) unstable; urgency=low + + * Patch from "Mario 'BitKoenig' Holbe" for + better logic on checking RAID status. (closes: #249944) + + -- Stephen Gran Wed, 19 May 2004 20:22:47 -0400 + +hdparm (5.5-3) unstable; urgency=low + + * Add support for nohdparm boot option, to disable init script + I think this addresses the last of the problems with #247170, so I am + going to say (closes: #247170) + * Fix typo in hdparm.conf (closes: #248934) + + -- Stephen Gran Sun, 16 May 2004 14:24:45 -0400 + +hdparm (5.5-2) unstable; urgency=low + + * Merge in some manpage fixups, hopefully increasing clarity. + * The start link is run too early for people who need modules for their + controller loaded in order to use DMA. Added a note to README.Debian + explaining what people can do in these circumstances, but leave the link + alone. It's safer for the start script to fail than to have silent data + corruption by running it too late by default. (closes: #233188) + + -- Stephen Gran Wed, 3 Mar 2004 15:16:08 -0500 + +hdparm (5.5-1) unstable; urgency=low + + * New upstream version (closes: #232613) + * Add warning about examples in conf file - some are for devfs, and some + are not. I thought this was clear enough, but I guess not. + (closes: #231641) + * Fix up typo in /etc/apm.d/20hdparm (closes: #231822) + + -- Stephen Gran Sat, 14 Feb 2004 00:18:07 -0500 + +hdparm (5.4-10) unstable; urgency=low + + * The "I'm actually putting the changes in this version" release. + * Bump up version dependency on debhelper to 4.1.17 for dh_installinit's + --no-start option. Thanks to Thomas Hood for noticing I forgot to + actually include this. (closes: #230496) + * Actually include the fixed manpage this time. (closes: #230331) + + -- Stephen Gran Sat, 31 Jan 2004 15:55:47 -0500 + +hdparm (5.4-9) unstable; urgency=low + + * Added support for -K and -k (keep settings over reset) - thanks Shaul Karl + for patches. (closes: #229022) + * Hopefully explained -M (acoustic management feature a little more clearly + in manpage, and added pointer to READM.acoustic (closes: #230331) + * Work a little smarter, instead of a little harder, thanks to Thomas + Hood. Let dh_installinit do The Right Thing, and use --no-start option, + so it doesn't add the invoke-rc.d lines in postinst and prerm. + + -- Stephen Gran Fri, 30 Jan 2004 13:29:54 -0500 + +hdparm (5.4-8) unstable; urgency=low + + * Added note to README.Debian to warn about the use of the init script with + MD arrays (thanks David Harris for bringing this to my attention). Added + pointer to README.Debian to hdparm.conf as well, reminding people to be + aware of known issues before enabling the initscript. + * Finally wrapped my head around invoke-rc.d a little better (thanks to all + those on debian-devel who helped me out here). Explicitly adding a K link + in all run levels will prevent invoke-rc.d from rerunning the script on + upgrade, where only having an S link in rcS.d apparently did not do the + expected. That should take care of that nagging detail that I thought had + actually been fixed in -7, and really deal with all the parts of #224961. + * Allow for setting APM functions (-B) in init script. (closes: #226124) + * Fix bug in /etc/apm/20hdparm that made script exit without doing anything, + since test $variable || exit 0 tested non-declared variable. + + -- Stephen Gran Fri, 30 Jan 2004 13:16:26 -0500 + +hdparm (5.4-7) unstable; urgency=low + + * Move running of /etc/init.d script earlier to avoid possible disk + corrution with 2.6 kernels. Also apply patch from Bruce Perens (thanks + Bruce) (closes: #224961) + + -- Stephen Gran Wed, 24 Dec 2003 08:37:20 -0500 + +hdparm (5.4-6) unstable; urgency=low + + * moved /etc/default/hdparm to /etc/hdparm.conf, because this is actually + policy compliant. It turns out (mea culpa) default/ files need to be + shell scripts, which this is not. Thanks for noticing this, joeyh. + (closes: #222133) + * Fixed manpage typo in section -M. Thanks, Adrian. (closes: #222557) + + -- Stephen Gran Fri, 5 Dec 2003 14:28:07 -0500 + +hdparm (5.4-5) unstable; urgency=low + + * Changed parsing of -c to accept multiple values instead of it being a + boolean option (closes: #219641) + * Make initscript parsing of /etc/default/ file more flexible - now allows + parsing of lines that contain whitespace in addition to a newline. Also + now has large note at top describing currently allowed syntax. + (closes: #219138) + + -- Stephen Gran Mon, 10 Nov 2003 23:10:01 -0500 + +hdparm (5.4-4) unstable; urgency=low + + * Add acoustic management support to /etc/init.d/hdparm script (and + /etc/default/hdparm) (closes: #217634) + + -- Stephen Gran Sun, 26 Oct 2003 10:44:06 -0500 + +hdparm (5.4-3) unstable; urgency=low + + * New maintainer (closes: #217098) + * Fix description of -A in manpage (closes: #212257) + * Build uses cdbs now, which supports building unstripped (closes: #190867) + * Change reference to boot time script to reflect actual file + (closes: #157919) + * /etc/apm/20hdparm now handles multiple drives (closes: #149558) + * /etc/init.d/hdparm and /etc/default/hdparm now included. + Many thanks to Shaul Karl and Joerg Sommer + for suggestions and samples. + (closes: #87451, #169406, #175506, #198516) + + -- Stephen Gran Thu, 23 Oct 2003 14:00:37 -0400 + +hdparm (5.4-2) unstable; urgency=low + + * Added cdbs to Build-Depends. + + -- Christopher L Cheney Mon, 4 Aug 2003 23:00:00 -0500 + +hdparm (5.4-1) unstable; urgency=low + + * New upstream release. + * Move contrib scripts. (Closes: #122644) + * Suggest apmd. (Closes: #137434) + * Include upstream documentation. (Closes: #155171) + * Bumped debhelper version. (Closes: #190866) + + -- Christopher L Cheney Mon, 4 Aug 2003 22:00:00 -0500 + +hdparm (5.3-0.1) unstable; urgency=low + + * NMU with permission of maintainer. + * New upstream release. (closes: #135708) + * This should build on s390/hppa/ia64 again (closes: #155725, #185704) + + -- Andrew Suffield Wed, 9 Apr 2003 21:40:35 +0100 + +hdparm (5.2-1) unstable; urgency=low + + * New upstream. + + -- Christopher L Cheney Wed, 31 Jul 2002 14:35:00 -0500 + +hdparm (4.5-1.2) unstable; urgency=low + + * NMU + * Change "Conflicts: apmd" to "Replaces: apmd", to comply with section + 7.5 of policy. This should eliminate upgrade problems. + + -- Chris Hanson Thu, 14 Mar 2002 00:26:38 -0500 + +hdparm (4.5-1.1) unstable; urgency=low + + * NMU with permission of maintainer. + * Move "/etc/apm/event.d/20hdparm" from the apmd package to the hdparm + package. + + -- Chris Hanson Thu, 7 Mar 2002 23:06:39 -0500 + +hdparm (4.5-1) unstable; urgency=high + + * New Upstream. (Closes: #101531) + * New Maintainer. + * Included contrib scripts. (Closes: #92620) + + -- Christopher L Cheney Wed, 28 Nov 2001 14:10:00 -0600 + +hdparm (3.9a-1) unstable woody; urgency=low + + * New upstream version (patch). Closes #85351, #77979, #58265 + * Hack around compilation issues. Closes #80897, #84520 + * Back out manpage patch. Closes #67060 + * Add upstream changelog. Closes #80126 + * Change doc for -q. Closes #37594 + + -- Steve Dunham Wed, 14 Feb 2001 16:35:12 -0800 + +hdparm (3.9-1) unstable; urgency=low + + * New upstream version + + -- Steve Dunham Tue, 16 May 2000 08:30:32 -0700 + +hdparm (3.6-2) unstable; urgency=low + + * Patch to unregister interfaces for thinkpads + * Closes: #54715 + + -- Steve Dunham Tue, 25 Jan 2000 10:10:20 -0800 + +hdparm (3.6-1) unstable; urgency=low + + * New upstream version + * Fix problem with no media on CDs + * Add comment about -q option + * Closes: #30866, #39511 + + -- Steve Dunham Fri, 29 Oct 1999 23:38:58 -0700 + +hdparm (3.5-1) unstable; urgency=low + + * New upstream version (#30010,#26368) + + -- Steve Dunham Fri, 27 Nov 1998 11:49:03 -0500 + +hdparm (3.3-3) unstable; urgency=low + + * Switch to debhelper (#17219) + + -- Steve Dunham Fri, 14 Aug 1998 00:15:38 -0400 + +hdparm (3.3-2) unstable; urgency=low + + * Fixed problem with automake + + -- Steve Dunham Mon, 21 Jul 1997 18:31:41 -0400 + +hdparm (3.3-1) unstable; urgency=low + + * New upstream version - upstream changes: + - add -C, -y, and -Y flags for IDE power management + - force BLKFLSBUF after -T or -t -- kmg@barco.com + - fix minor -T/-t mixup in manpage -- hankedr@mail.auburn.edu + + + -- Steve Dunham Sun, 8 Jun 1997 13:18:10 -0400 + +hdparm (3.1-2) unstable; urgency=low + + * Fixed Architecture: field + + * Upgrade to 3.1. Change to "Package format of the month"(TM) + + -- Steve Dunham Thu, 10 Oct 1996 19:51:22 -0800 + --- hdparm-8.9.orig/debian/watch +++ hdparm-8.9/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://www.ibiblio.org/pub/Linux/system/hardware (?:.*/)?hdparm-?_?([\w+\d+\.]+|\d+)(\.tar|\.tgz)(\.gz|\.bz2|) debian uupdate --- hdparm-8.9.orig/debian/compat +++ hdparm-8.9/debian/compat @@ -0,0 +1 @@ +5 --- hdparm-8.9.orig/debian/hdparm.default +++ hdparm-8.9/debian/hdparm.default @@ -0,0 +1,19 @@ +# To set the same options for a block of harddisks, do so with something +# like the following example options: +# harddisks="/dev/hda /dev/hdb" +# hdparm_opts="-d1 -X66" +# This is run before the configuration in hdparm.conf. Do not use +# this arrangement if you need modules loaded for your hard disks, +# or need udev to create the nodes, or have some other local quirk +# These are better addressed with the options in /etc/hdparm.conf +# +# harddisks="" +# hdparm_opts="" + +# By default, hdparm will refuse to set harddisk options on any drive +# if the system has software RAID running, and one or more disk arrays +# are in the process of resynchronisation. +# With this variable set to 'yes', /etc/init.d/hdparm will suspend the +# RAID resynchronisation process before setting harddisk options, and +# will resume it after setting is done. +RAID_WORKAROUND=no --- hdparm-8.9.orig/debian/control +++ hdparm-8.9/debian/control @@ -0,0 +1,34 @@ +Source: hdparm +Section: admin +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Stephen Gran +Build-Depends: cdbs (>> 0.4.37), debhelper (>= 5.0), dpatch, dpkg-dev (>= 1.13.19) +Standards-Version: 3.8.0 + +Package: hdparm +Architecture: any +Depends: ${shlibs:Depends} +Suggests: apmd +Replaces: apmd (<= 3.0.2-1.15) +Description: tune hard disk parameters for high performance + Get/set hard disk parameters for Linux IDE drives. + Primary use is for enabling irq-unmasking and IDE multiplemode. + +Package: hdparm-dbg +Architecture: any +Priority: extra +Depends: hdparm (= ${binary:Version}) +Description: debug files for hdparm + This package contains the stripped debugging symbols for hdparm + +Package: hdparm-udeb +XC-Package-Type: udeb +Section: debian-installer +Architecture: any +Depends: ${shlibs:Depends} +Description: tune hard disk parameters for high performance + Get/set hard disk parameters for Linux IDE drives. + Primary use is for enabling irq-unmasking and IDE multiplemode. + . + This is a minimal package for use in debian-installer. --- hdparm-8.9.orig/debian/changelog.old +++ hdparm-8.9/debian/changelog.old @@ -0,0 +1,18 @@ +old changelog + +23-December-1994 Bruce Perens + Added Debian GNU/Linux package maintenance system files, and configured + for Debian. + +22-June-1995 Guy R. Thomas + Took over maintenance of package. New Debian revision. + +22-June-1995 Guy R. Thomas + Upgraded to current version. ( May 31, 1995 ) + +25-June-1996 Steve Dunham + Upgraded to current version. + +Local variables: +mode: debian-changelog +End: --- hdparm-8.9.orig/debian/20hdparm +++ hdparm-8.9/debian/20hdparm @@ -0,0 +1,82 @@ +#!/bin/sh + +# Copyright (c) 2000-2002 Massachusetts Institute of Technology +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +set -e + +# The APMD_DRIVES setting specifies the drives to be changed. Set +# this to an empty string to disable any changes. +#APMD_DRIVES= + +# The spindown timeout is set to the value of APMD_SPINDOWN when the +# computer is running on battery power. When the computer is on AC +# power, the spindown timeout is disabled. The number specified here +# is encoded in a complicated way. See the man page for hdparm(8) for +# details. For small timeouts, numbers between 1 and 240 specify +# multiples of 5 seconds. So the default value of 18 means 18*5=90 +# seconds, or 1.5 minutes. +APMD_SPINDOWN=18 + +HDPARM=/sbin/hdparm +[ -x "${HDPARM}" ] || exit 0 + +[ -n "${APMD_DRIVES}" ] || exit 0 + +for DRIVE in $APMD_DRIVES; do + [ -b "${DRIVE}" ] || exit 0 +done + +[ "${APMD_SPINDOWN}" -gt 0 ] || exit 0 + +power_conserve () +{ + # Set IDE hard disk spindown time to a short time. + for DRIVE in $APMD_DRIVES; do + "${HDPARM}" -q -S "${APMD_SPINDOWN}" "${DRIVE}" || true + done +} + +power_performance () +{ + # Disable IDE hard disk spindown. + for DRIVE in $APMD_DRIVES; do + "${HDPARM}" -q -S 0 "${DRIVE}" || true + done +} + +choose_power () +{ + if on_ac_power > /dev/null + then + power_performance + else + power_conserve + fi +} + +if [ "${1}" = "start" ]; then + choose_power +elif [ "${1}" = "resume" ] && [ "${2}" != "standby" ]; then + choose_power +elif [ "${1},${2}" = "change,power" ]; then + choose_power +elif [ "${1}" = "stop" ]; then + power_performance +fi + +exit 0 --- hdparm-8.9.orig/debian/hdparm.dirs +++ hdparm-8.9/debian/hdparm.dirs @@ -0,0 +1,2 @@ +etc/udev/rules.d +lib/udev --- hdparm-8.9.orig/debian/hdparm.conf.5 +++ hdparm-8.9/debian/hdparm.conf.5 @@ -0,0 +1,160 @@ +.\" Text automatically generated by txt2man-1.4.7 +.TH hdparm.conf "5" "August 10, 2005" "Stephen Gran" "hdparm configuration file" +.SH "NAME" +.LP +hdparm.conf \- Debian configuration file for hdparm +.SH "DESCRIPTION" +.LP +This is the default configuration for hdparm for Debian. +It is a rather simple script, so please follow the following guidelines :) +Any line that begins with a comment is ignored \- add as many as you +like. +.LP +Note that an in\-line comment is not supported. If a line +consists of whitespace only (tabs, spaces, carriage return), it will be +ignored, so you can space control fields as you like. ANYTHING ELSE +IS PARSED!! +.LP +This means that lines with stray characters or lines that +use non # comment characters will be interpreted by the initscript. +This has probably minor, but potentially serious, side effects for your +hard drives, so please follow the guidelines. +Patches to improve flexibilty welcome. +.LP +Please read /usr/share/doc/hdparm/README.Debian for +notes about known issues, especially if you have an MD array. +.LP +Note that if the init script causes boot problems, you can pass 'nohdparm' +on the kernel command line, and the script will not be run. +.LP +Setting an option outside of one of the stanzas enables it for all drives. +.LP +If an option is listed twice, the second instance replaces the first. +.LP +/sbin/hdparm is not run unless a block of the form: +.LP +.B +DEV { +.TP +option +.TP +option +.TP +} +.LP +exists. +This blocks will cause /sbin/hdparm OPTIONS DEV to be run. +Where OPTIONS is the concatenation of all options previously defined +outside of a block and all options defined with in the block. +.SH "OPTIONS" +.TP +\fB\-q\fR be quiet +quiet +.TP +\fB\-a\fR sector count for filesystem read-ahead +read_ahead_sect = 12 +.TP +\fB\-A\fR disable/enable the IDE drive's read-lookahead feature +lookahead = on +.TP +\fB\-b\fR bus state +bus = on +.TP +\fB\-B\fR apm setting +apm = 255 +.TP +\fB\-c\fR enable (E)IDE 32-bit I/O support - can be any of 0,1,3 +io32_support = 1 +.TP +\fB\-d\fR disable/enable the "using_dma" flag for this drive +dma = off +.TP +\fB\-D\fR enable/disable the on-drive defect management +defect_mana = off +.TP +\fB\-E\fR cdrom speed +cd_speed = 16 +.TP +\fB\-k\fR disable/enable the "keep_settings_over_reset" flag for this drive +keep_settings_over_reset = off +.TP +\fB\-K\fR disable/enable the drive's "keep_features_over_reset" flag +keep_features_over_reset = on +.TP +\fB\-m\fR sector count for multiple sector I/O +mult_sect_io = 32 +.TP +\fB\-P\fR maximum sector count for the drive's internal prefetch mechanism +prefetch_sect = 12 +.TP +\fB\-r\fR read-only flag for device +read_only = off +.TP +\fB\-s\fR Enable/disable the power-on in standby feature +poweron_standby = off +.TP +\fB\-S\fR standby (spindown) timeout for the drive +spindown_time = 24 +.TP +\fB\-u\fR interrupt-unmask flag for the drive +interrupt_unmask = on +.TP +\fB\-W\fR Disable/enable the IDE drive's write-caching feature +write_cache = off +.TP +\fB\-X\fR IDE transfer mode for newer (E)IDE/ATA2 drives +transfer_mode = 34 +.TP +\fB\-y\fR force to immediately enter the standby mode +standby +.TP +\fB\-Y\fR force to immediately enter the sleep mode +sleep +.TP +\fB\-Z\fR Disable the power-saving function of certain Seagate drives +disable_seagate +.TP +\fB\-M\fR Set the acoustic management properties of a drive +acoustic_management +.TP +\fB\-p\fR Set the chipset PIO mode + chipset_pio_mode +.TP +\fB--security-freeze\fR Freeze the drive's security status +security_freeze +.TP +\fB--security-unlock\fR Unlock the drive's security +security_unlock = PWD +.TP +\fB--security-set-pass\fR Set security password +security_pass = password +.TP +\fB--security-disable\fR Disable drive locking +security_disable +.TP +\fB--user-master\fR Specifies which password to select +security_mode = u +.TP +\fB--security-mode\fR Set the security mode +security_mode = h +.TP +Root file systems. +Please see README.Debian for details. +ROOTFS = /dev/hda +.PP +You can use straight hdparm commands in this config file +as well \- the set up is ugly, but it keeps backwards compatibility. +Additionally, it should be noted that any blocks that begin with +the keyword 'command_line' are not run until after the root filesystem +is mounted. +This is done to avoid running blocks twice. If you need +to run hdparm to set parameters for your root disk, please use the +standard format. +.SH AUTHOR +hdparm was written by Mark Lord +The init script and configuration file are currently maintained by +Stephen Gran , but are the result of the work of many people. +.PP +This manual page was created by Stephen Gran +for the Debian GNU/Linux system (but may be used by others). + --- hdparm-8.9.orig/debian/hdparm.rules +++ hdparm-8.9/debian/hdparm.rules @@ -0,0 +1,2 @@ +ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", \ + RUN+="/lib/udev/hdparm" --- hdparm-8.9.orig/debian/hdparm.postinst +++ hdparm-8.9/debian/hdparm.postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +# Clean up cdbs damage +rm -f /etc/udev/rules.d/50-hdparm.rules + + +if dpkg --compare-versions "$2" lt "8.6-1ubuntu1"; then + update-rc.d -f hdparm remove +fi + +if [ -n "$2" ] && dpkg --compare-versions "$2" lt 8.9-2; then + rm -fv /etc/rc0.d/K75hdparm /etc/rc6.d/K75hdparm +fi +#DEBHELPER# --- hdparm-8.9.orig/debian/README.Debian +++ hdparm-8.9/debian/README.Debian @@ -0,0 +1,92 @@ +hdparm for Debian + ----------------- + +General hard disk tuning: + + To get the best performance out of your hard drive turn on DMA support + in the kernel and enable 32bit IO (-c) and multiple sector I/O (-m) + with hdparm. You can find out the number to use for -m by using -i and + reading MaxMultSect. + + These settings can now be set in either /etc/hdparm.conf or in + /etc/apm/20hdparm. I advise against setting the same features in both - + unpredictable things could happen. + +Multiple disks with the same options: + + /etc/default/hdparm can take environment variables for simple options + for a block of disks that are to be set up in the same way. This would + be useful for a JBOD type array, or similar arrangement. Setting up disks + in this way does not currently integrate with the more complicated checks + and arrangements that are done with the settings in hdparm.conf. If you + need to load modules before tuning a hard disk, or need to allow udev to + run before hdparm, do not use this option. This is intended only for + disks with normal device nodes, accessible early in the boot process, and + with kernel support before module loading. A complete rewrite is really + needed to better integrate this option. Hopefully I'll have the time soon + (or somebody will send the patches :) + +APM and ACPI: + APM and ACPI are handled somewhat differently in Debian. If you have a + machine that uses APM, there is a script in /etc/apmd that you can use to + have APM events trigger hdparm commands. For ACPI users, I recommend a + package like powersaved, that will call hdparm as appropriate for ACPI + events. + +Some problems with udev and module loading: + + hdparm's init script is set to run at /etc/rcS.d/S07 because there have + been reports of data corruption with mounted disks. This particular + placement may not work for you if the ability to use things like DMA + relies on having modules for your motherboard or drive loaded, as it is + run before the module loading init script. If this is the case for you, + (and you don't use udev) do the following: + + In hdparm.conf, set ROOTFS to whatever drive / is mounted on, for example + ROOTFS = /dev/hda + + Set up a second link, /etc/rcS.d/S29hdparm.second, pointing to + /etc/init.d/hdparm. ln -s /etc/init.d/hdparm /etc/rcS.d/S29hdparm.second + will do this for you. + + If you use an alternate init scheme, such as runit or minit or file-rc, + set this up appropriately for your setup. The important thing is that + the link name does not _end_ in 'hdparm' (the script checks this with + case "$0" in *hdparm), so take care in your naming scheme. Now the init + script will run once at 07 for your root drive, and then later for all + other defined devices. This will give the other scripts a chance to + load modules and create devices. + + hdparm now supports udev created device nodes, using the script + /etc/udev/hdparm.rules. This allows users to set up regular stanzas in + /etc/hdparm.conf, that will fail the first time (as the device nodes + don't yet exist) but will be properly set up when udev gets to them. + +Known problems, limitations, and work-arounds: + + Additional information from David B Harris: + The init script is probably not safe to run with an MD array, as there + is a possibility of disk corruption during rebuild if the array was not + stopped cleanly. As the rebuild process begins (at least on newer MD + arrays) before init is started, there is no way to run the init script + early enough for this to always be safe. Please do not add anything to + hdparm.conf, and instead run hdparm by hand only after you are sure that + your array has finished rebuilding. + + For this reason, the init script aborts if it detects that the raid array + is not rebuilt, or otherwise 'dirty'. See below for ways to bypass these + checks. + + If the init script gives you problems, you can boot the kernel with the + command line option 'nohdparm' (without the single quotes), and the init + script will not run. + + If one of the built-in checks that aborts the hdparm init script is + triggered (RAID array is rebuilding, nohdparm was passed on the kernel + command line), the init script will not run at boot time. If you want + to run the init script anyway, you can override the safety features by + passing the environment variable FORCE_RUN=yes to the init script. + i.e.: + FORCE_RUN=yes /etc/init.d/hdparm start + + -- Stephen Gran Wed, 10 Aug 2005 14:48:31 -0400 --- hdparm-8.9.orig/debian/hdparm.udev-script +++ hdparm-8.9/debian/hdparm.udev-script @@ -0,0 +1,245 @@ +#!/bin/sh + +set -e + +[ "$DEVNAME" ] || exit 1 + +if [ -e /proc/cmdline ]; then #linux only - future proofing against BSD and Hurd :) + if grep -wq "nohdparm" /proc/cmdline ; then + exit 0 + fi +fi + +raidstat=OK +if [ -e /proc/mdstat ]; then + if egrep -iq "resync|repair|recover|check" /proc/mdstat; then + raidstat=RESYNC + fi +elif [ -e /proc/rd/status ]; then + raidstat=`cat /proc/rd/status` +fi + +if ! [ "$raidstat" = 'OK' ]; then + exit 1 +fi + +set_option() +{ + if test -n "$DISC"; then + NEW_OPT= + for i in $OPTIONS; do + if test x${i%${i#??}} != x${1%${1#??}}; then + NEW_OPT="$NEW_OPT $i" + else + NEW_OPT=${NEW_OPT%-q} + fi + done + OPTIONS="$NEW_OPT $OPT_QUIET $1" + else + NEW_DEF= + for i in $DEFAULT; do + if test x${i%${i#??}} != x${1%${1#??}}; then + NEW_DEF="$NEW_DEF $i" + else + NEW_DEF=${NEW_DEF%-q} + fi + done + DEFAULT="$NEW_DEF $DEF_QUIET $1" + fi +} + +eval_value() +{ + case $1 in + off|0) + set_option "$2"0 + ;; + on|1) + set_option "$2"1 + ;; + *) + log_failure_msg "Unknown Value for $2: $1" + exit 1 + ;; + esac +} + +WAS_RUN=0 + +# Get blocks as far as the drive's write cache. +/bin/sync + +DISC= +DEFAULT= +OPTIONS= +DEF_QUIET= +OPT_QUIET= + +egrep -v '^[[:space:]]*(#|$)' /etc/hdparm.conf | +{ + while read KEY SEP VALUE; do + if [ "$NEXT_LINE" != 'go' ]; then + case $SEP in + '{') + case $KEY in + command_line) + NEXT_LINE=go + unset DISC + unset OPTIONS + unset OPT_QUIET + IN_BLOCK=0 + ;; + *) + DISC=$KEY + OPTIONS=$DEFAULT + OPT_QUIET=$DEF_QUIET + WAS_RUN=0 + if [ "$DISC" = "$DEVNAME" ]; then + IN_BLOCK=1 + else + IN_BLOCK=0 + fi + ;; + esac + ;; + =) + case $KEY in + read_ahead_sect) + set_option -a$VALUE + ;; + lookahead) + eval_value $VALUE -A + ;; + bus) + eval_value $VALUE -b + ;; + apm) + set_option -B$VALUE + ;; + io32_support) + set_option -c$VALUE + ;; + dma) + eval_value $VALUE -d + ;; + defect_mana) + eval_value $VALUE -D + ;; + cd_speed) + set_option -E$VALUE + ;; + mult_sect_io) + set_option -m$VALUE + ;; + prefetch_sect) + set_option -P$VALUE + ;; + read_only) + eval_value $VALUE -r + ;; + spindown_time) + set_option -S$VALUE + ;; + poweron_standby) + eval_value $VALUE -s + ;; + interrupt_unmask) + eval_value $VALUE -u + ;; + write_cache) + eval_value $VALUE -W + ;; + transfer_mode) + set_option -X$VALUE + ;; + acoustic_management) + set_option -M$VALUE + ;; + keep_settings_over_reset) + eval_value $VALUE -k + ;; + keep_features_over_reset) + eval_value $VALUE -K + ;; + chipset_pio_mode) + set_option -p$VALUE + ;; + security_unlock) + set_option --security-unlock $VALUE + ;; + security_pass) + set_option --security-set-pass $VALUE + ;; + security_disable) + set_option --security-disable $VALUE + ;; + user-master) + set_option --user-master $VALUE + ;; + security_mode) + set_option --security-mode $VALUE + ;; + ROOTFS) + ROOTFS=$VALUE + ;; + *) + echo "Unknown option $KEY" + exit 1 + ;; + esac + ;; + "") + case $KEY in + '}') + if [ -z "$DISC" ] && [ "$WAS_RUN" != '1' ]; then + echo "No disk enabled. Exiting" + exit 1 + fi + if [ -n "$OPTIONS" ] && [ -b "$DISC" ]; then + ret=0 + if [ "$IN_BLOCK" = 1 ]; then + # Flush the drive's internal write cache to the disk. + /sbin/hdparm -q -f $DISC 2>/dev/null || ret=$? + /sbin/hdparm $OPTIONS $DISC 2>/dev/null || ret=$? + fi + fi + ;; + quiet) + if [ -n "$DISC" ]; then + OPT_QUIET=-q + else + DEF_QUIET=-q + fi + ;; + standby) + set_option -y + ;; + sleep) + set_option -Y + ;; + disable_seagate) + set_option -Z + ;; + security_freeze) + set_option --security-freeze + ;; + *) + echo "unknown option $KEY" + exit 1 + ;; + esac + ;; + *) + echo "unknown separator $SEP" + exit 1 + ;; + esac + else + $KEY $SEP $VALUE + NEXT_LINE=no-go + WAS_RUN=1 + fi + done +} + +exit 0 --- hdparm-8.9.orig/debian/hdparm.install +++ hdparm-8.9/debian/hdparm.install @@ -0,0 +1,7 @@ +debian/20hdparm etc/apm/event.d/ +debian/tmp/sbin/hdparm +contrib/fix_standby.c usr/share/doc/hdparm/contrib +contrib/idectl usr/share/doc/hdparm/contrib +contrib/README usr/share/doc/hdparm/contrib +contrib/ultrabayd usr/share/doc/hdparm/contrib +debian/hdparm.conf etc/ --- hdparm-8.9.orig/debian/hdparm.postrm +++ hdparm-8.9/debian/hdparm.postrm @@ -0,0 +1,9 @@ +#!/bin/sh + +case "$1" in + purge) + [ ! -L /etc/udev/rules.d/z60_hdparm.rules ] || rm /etc/udev/rules.d/z60_hdparm.rules + ;; +esac + +#DEBHELPER# --- hdparm-8.9.orig/debian/hdparm.dev +++ hdparm-8.9/debian/hdparm.dev @@ -0,0 +1,8 @@ +#!/bin/sh +# $DEVNAME device name +# $ACTION action add/remove + +[ -n "$DEVNAME" ] || exit 0 +[ "$DEVNAME" != "${DEVNAME#/}" ] || exit 0 +[ "$ACTION" = 'add' ] || exit 0 +[ -x /etc/init.d/hdparm ] && ACTION=$ACTION DEVNAME=$DEVNAME /etc/init.d/hdparm hotplug --- hdparm-8.9.orig/debian/hdparm.manpages +++ hdparm-8.9/debian/hdparm.manpages @@ -0,0 +1,2 @@ +hdparm.8 +debian/hdparm.conf.5 --- hdparm-8.9.orig/debian/hdparm.preinst +++ hdparm-8.9/debian/hdparm.preinst @@ -0,0 +1,48 @@ +#!/bin/sh + +# Remove a no-longer used conffile +rm_conffile() { + CONFFILE="$1" + + if [ -e "$CONFFILE" ]; then + md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" + old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" + if [ "$md5sum" != "$old_md5sum" ]; then + echo "Obsolete conffile $CONFFILE has been modified by you." + echo "Saving as $CONFFILE.dpkg-bak ..." + mv -f "$CONFFILE" "$CONFFILE".dpkg-bak + else + echo "Removing obsolete conffile $CONFFILE ..." + rm -f "$CONFFILE" + fi + fi +} + +if [ "$1" = install ] || [ "$1" = upgrade ]; then + if dpkg --compare-versions "$2" le 8.6-1ubuntu1; then + rm_conffile /etc/init.d/hdparm + update-rc.d -f hdparm remove >/dev/null 2>&1 + fi + + if dpkg --compare-versions "$2" le 6.1-6; then + if dpkg --compare-versions "$2" gt 6.1-2; then + for conffile in /etc/init.d/hdparm.dev /etc/default/hdparm /etc/dev.d/block/hdparm.block /etc/dev.d/block/hdparm.dev; do + [ ! -e "$conffile" ] || rm_conffile "$conffile" + done + elif dpkg --compare-versions "$2" lt 5.5-5; then + update-rc.d -f hdparm remove > /dev/null 2>&1 + if dpkg --compare-versions "$2" lt 5.4-6; then + [ ! -e /etc/hdparm.conf ] || rm_conffile "/etc/hdparm.conf" + if dpkg --compare-versions "$2" ge 5.4-3; then + if [ -e /etc/default/hdparm ]; then + echo -n "Moving old /etc/default/hdparm to /etc/hdparm.conf . . " + mv /etc/default/hdparm /etc/hdparm.conf + echo "done." + fi + fi + fi + fi + fi +fi + +#DEBHELPER# --- hdparm-8.9.orig/debian/hdparm.docs +++ hdparm-8.9/debian/hdparm.docs @@ -0,0 +1,2 @@ +README.acoustic +debian/changelog.old --- hdparm-8.9.orig/debian/rules +++ hdparm-8.9/debian/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2003 Jeff Bailey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +DEB_DH_INSTALLINIT_ARGS := --no-start --noscripts --onlyscripts +#DEB_DH_LINK_ARGS := ../init.d/hdparm /etc/rcS.d/S07hdparm.first +DEB_FIXPERMS_EXCLUDE:= 20hdparm + +include /usr/share/cdbs/1/rules/dpatch.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk + +DEB_MAKE_INSTALL_TARGET := install DESTDIR=$(CURDIR)/debian/tmp + +common-install-prehook-arch:: + install -d $(CURDIR)/debian/tmp/sbin +common-binary-post-install-arch:: + install -m 644 $(CURDIR)/debian/hdparm.rules $(CURDIR)/debian/hdparm/etc/udev/rules.d/85-hdparm.rules + install -m 755 $(CURDIR)/debian/hdparm.udev-script $(CURDIR)/debian/hdparm/lib/udev/hdparm +binary-predeb/hdparm:: + chmod 755 $(CURDIR)/debian/hdparm/etc/apm/event.d/20hdparm --- hdparm-8.9.orig/debian/copyright +++ hdparm-8.9/debian/copyright @@ -0,0 +1,17 @@ +This package was debianized by Christopher L Cheney on +Wed, 21 Nov 2001 15:51:14 -0600. + +It was downloaded from http://www.ibiblio.org/pub/Linux/system/hardware + +Upstream Author: Mark S. Lord + +Copyright: + +/* hdparm.c - Command line interface to get/set hard disk parameters */ +/* - by Mark Lord © 1994-2008 -- freely distributable */ + +You are free to distribute this software under the terms of the BSD License. +On Debian systems, the complete text of the BSD License can be found in +/usr/share/common-licenses/BSD + + --- hdparm-8.9.orig/debian/patches/40_hdparm_no_strip.dpatch +++ hdparm-8.9/debian/patches/40_hdparm_no_strip.dpatch @@ -0,0 +1,17 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 40_hdparm_no_strip.dpatch by Stephen Gran +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Don't strip the binary during build, let dh_strip do it + +@DPATCH@ +--- a/Makefile (revision 428) ++++ b/Makefile (working copy) +@@ -26,7 +26,6 @@ + + hdparm: hdparm.h sgio.h $(OBJS) + $(CC) $(LDFLAGS) -o hdparm $(OBJS) +- strip hdparm + + sgio.o: sgio.h + --- hdparm-8.9.orig/debian/patches/30.explain.get.set.dpatch +++ hdparm-8.9/debian/patches/30.explain.get.set.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 20_man.files.typo.dpatch by Stephen Gran +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Better explain get/set options + +@DPATCH@ +--- a/hdparm.8 (revision 314) ++++ b/hdparm.8 (working copy) +@@ -15,6 +15,8 @@ + When no flags are given, + .I -acdgkmnru + is assumed. ++For Get/Set options, a query without an optional parameter (e.g., \-d) will query (get) ++the drive state, and with a parameter (e.g., \-d0) will set the drive state. + .TP + .I -a + Get/set sector count for filesystem (software) read-ahead. --- hdparm-8.9.orig/debian/patches/00list +++ hdparm-8.9/debian/patches/00list @@ -0,0 +1,4 @@ +10_man.files.dpatch +20_man.files.typo.dpatch +30.explain.get.set.dpatch +40_hdparm_no_strip.dpatch --- hdparm-8.9.orig/debian/patches/20_man.files.typo.dpatch +++ hdparm-8.9/debian/patches/20_man.files.typo.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 20_man.files.typo.dpatch by A. Costa +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: manpage typo + +@DPATCH@ +--- hdparm/hdparm.8.old 2005-11-21 23:40:00.000000000 +0000 ++++ hdparm/hdparm.8 2005-11-21 23:40:18.000000000 +0000 +@@ -206,7 +206,7 @@ + will unlock the door mechanism. Normally, Linux + maintains the door locking mechanism automatically, depending on drive usage + (locked whenever a filesystem is mounted). But on system shutdown, this can +-be a nuisance if the root partition is on a removeable disk, since the root ++be a nuisance if the root partition is on a removable disk, since the root + partition is left mounted (read-only) after shutdown. So, by using this + command to unlock the door + .B after --- hdparm-8.9.orig/debian/patches/10_man.files.dpatch +++ hdparm-8.9/debian/patches/10_man.files.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_man.files.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Add FILES to manpage + +@DPATCH@ + +--- hdparm/hdparm.8.old 2005-11-21 23:40:00.000000000 +0000 ++++ hdparm/hdparm.8 2005-11-21 23:40:18.000000000 +0000 +@@ -551,6 +551,8 @@ + m maximum security + + .B THIS FEATURE IS EXPERIMENTAL AND NOT WELL TESTED. USE AT YOUR OWN RISK. ++.SH FILES ++/etc/hdparm.conf + .SH BUGS + As noted above, the + .B -m sectcount