Imported Upstream version 1.05

This commit is contained in:
Mario Fetka
2017-04-19 13:33:37 +02:00
commit 0343893f09
16 changed files with 1443 additions and 0 deletions

70
debian/changelog vendored Normal file
View File

@@ -0,0 +1,70 @@
hd-idle (1.05) unstable; urgency=low
* Allow SCSI device names with more than one character (e.g. sdaa) in case
there are more than 26 SCSI targets.
-- Christian Mueller <cm1@mumac.de> Sun, 6 Apr 2014 22:02:00 +0200
hd-idle (1.04) unstable; urgency=low
* Make hd-idle's build environment compatible to Debian package management;
this effort is meant to allow hd-idle to become an official Debian package
* Man page for hd-idle
-- Christian Mueller <cm1@mumac.de> Fri, 30 Sep 2011 22:35:12 +0200
hd-idle (1.03) unstable; urgency=low
* Use %u in dprintf() when reporting number of reads and writes (the
corresponding variable is an unsigned int).
* Fix example in README where the parameter "-a" was written as "-n".
-- Christian Mueller <cm1@mumac.de> Sun, 5 Dec 2010 19:25:51 +0100
hd-idle (1.02) unstable; urgency=low
* In case the SCSI stop unit command fails with "check condition", print a
hex dump of the sense buffer to stderr. This is supposed to help
debugging.
-- Christian Mueller <cm1@mumac.de> Sat, 6 Nov 2010 15:47:00 +0100
hd-idle (1.01) unstable; urgency=low
* The parameter "-a" now also supports symlinks for disk names. Thus, disks
can be specified using something like /dev/disk/by-uuid/... Use "-d" to
verify that the resulting disk name is what you want.
Please note that disk names are resolved to device nodes at startup. Also,
since many entries in /dev/disk/by-xxx are actually partitions, partition
numbers are automatically removed from the resulting device node.
* Not really a bug, but the disk name comparison used strstr which is a bit
useless because only disks starting with "sd" and a single letter after
that are currently considered. Replaced the comparison with strcmp()
-- Christian Mueller <cm1@mumac.de> Fri, 26 Feb 2010 14:03:44 +0100
hd-idle (1.00) unstable; urgency=low
* New parameter "-a" to allow selecting idle timeouts for individual disks;
compatibility to previous releases is maintained by having an implicit
default which matches all SCSI disks
* Changed comparison operator for idle periods from '>' to '>=' to prevent
adding one polling interval to idle time
* Changed sleep time before calling sync after updating the log file to 1s
(from 3s) to accumulate fewer dirty blocks before synching. It's still
a compromize but the log file is for debugging purposes, anyway. A test
with fsync() was unsuccessful because the next bdflush-initiated sync
still caused spin-ups.
-- Christian Mueller <cm1@mumac.de> Wed, 18 Nov 2009 20:53:17 +0100
hd-idle (0.99) unstable; urgency=low
* Initial Release.
-- Christian Mueller <cm1@mumac.de> Mon, 23 Apr 2007 22:03:10 +0100

1
debian/compat vendored Normal file
View File

@@ -0,0 +1 @@
7

34
debian/control vendored Normal file
View File

@@ -0,0 +1,34 @@
Source: hd-idle
Section: utils
Priority: extra
Maintainer: Christian Mueller <cm1@mumac.de>
Build-Depends: debhelper (>= 7.0.50~), libc6-dev
Standards-Version: 3.8.4
Homepage: http://hd-idle.sf.net
#Vcs-Git: git://git.debian.org/collab-maint/hd-idle.git
#Vcs-Browser: http://git.debian.org/?p=collab-maint/hd-idle.git;a=summary
Package: hd-idle
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Spin down idle [USB] hard disks
hd-idle is a utility program for spinning-down external disks after a period
of idle time. Since most external IDE disk enclosures don't support setting
the IDE idle timer, a program like hd-idle is required to spin down idle disks
automatically.
.
A word of caution: hard disks don't like spinning up too often. Laptop disks
are more robust in this respect than desktop disks but if you set your disks
to spin down after a few seconds you may damage the disk over time due to the
stress the spin-up causes on the spindle motor and bearings. It seems that
manufacturers recommend a minimum idle time of 3-5 minutes, the default in
hd-idle is 10 minutes.
.
One more word of caution: hd-idle will spin down any disk accessible via the
SCSI layer (USB, IEEE1394, ...) but it will not work with real SCSI disks
because they don't spin up automatically. Thus it's not called scsi-idle and
I don't recommend using it on a real SCSI system unless you have a kernel
patch that automatically starts the SCSI disks after receiving a sense buffer
indicating the disk has been stopped. Without such a patch, real SCSI disks
won't start again and you can as well pull the plug.

34
debian/copyright vendored Normal file
View File

@@ -0,0 +1,34 @@
This work was written and packaged by Christian Mueller <cm1@mumac.de>
It was downloaded from: <http://hd-idle.sf.net>
Upstream Author(s): Christian Mueller <cm1@mumac.de>
Copyright:
<Copyright (C) 2007 Christian Mueller>
License:
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 3 of the License, or
(at your option) any later version.
This package 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, see <http://www.gnu.org/licenses/>.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
The Debian packaging is:
Copyright (C) 2011 Christian Mueller <cm1@mumac.de>
and is licensed under the GPL version 3, see above.

1
debian/docs vendored Normal file
View File

@@ -0,0 +1 @@
README

30
debian/hd-idle.default vendored Normal file
View File

@@ -0,0 +1,30 @@
# defaults file for hd-idle
# start hd-idle automatically?
START_HD_IDLE=false
# hd-idle command line options
# Options are:
# -a <name> Set device name of disks for subsequent idle-time
# parameters (-i). This parameter is optional in the
# sense that there's a default entry for all disks
# which are not named otherwise by using this
# parameter. This can also be a symlink
# (e.g. /dev/disk/by-uuid/...)
# -i <idle_time> Idle time in seconds.
# -l <logfile> Name of logfile (written only after a disk has spun
# up). Please note that this option might cause the
# disk which holds the logfile to spin up just because
# another disk had some activity. This option should
# not be used on systems with more than one disk
# except for tuning purposes. On single-disk systems,
# this option should not cause any additional spinups.
#
# Options not exactly useful here:
# -t <disk> Spin-down the specfified disk immediately and exit.
# -d Debug mode. This will prevent hd-idle from
# becoming a daemon and print debugging info to
# stdout/stderr
# -h Print usage information.
#HD_IDLE_OPTS="-i 180 -l /var/log/hd-idle.log"

53
debian/hd-idle.init vendored Executable file
View File

@@ -0,0 +1,53 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: hd-idle
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start hd-idle daemon (spin down idle hard disks)
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/hd-idle
HD_IDLE_OPTS="-i 600"
START_HD_IDLE=false
[ -r /etc/default/hd-idle ] && . /etc/default/hd-idle
if [ "$START_HD_IDLE" != "true" ] ; then
exit 0
fi
# See if the daemon is there
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting the hd-idle daemon" "hd-idle"
start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- $HD_IDLE_OPTS
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping the hd-idle daemon" "hd-idle"
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
log_end_msg $?
;;
restart|force-reload)
$0 stop && sleep 2 && $0 start
;;
*)
echo "Usage: /etc/init.d/hd-idle start/stop/restart/force-reload"
exit 1
;;
esac

13
debian/rules vendored Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
%:
dh $@

1
debian/source/format vendored Normal file
View File

@@ -0,0 +1 @@
3.0 (native)