Last active
October 5, 2015 09:57
-
-
Save pboehm/2789458 to your computer and use it in GitHub Desktop.
HDD spindown script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script, welches die HDD /dev/sdb so einstellt, dass sie sich möglichst | |
# schnell schlafen legt und dann das Schlafen auch einmal manuell ausführt | |
# | |
# sollte in /etc/pm/sleep.d/ plaziert werden und ausführbar (755) sein | |
# | |
case "$1" in | |
hibernate|suspend) | |
;; | |
thaw|resume) | |
# HDD SpinDown einstellen | |
hdparm -S6 /dev/sdb | |
sleep 1 | |
hdparm -y /dev/sdb | |
;; | |
*) | |
;; | |
esac | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment