03_hdparm 269 B

1234567891011121314
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. # Spin down drives after one minute if inactive
  3. if [ ! -n "$(command -v hdparm)" ]; then
  4. exit 0
  5. fi
  6. DISKS=$(find /dev/sd[a-z] 2>/dev/null)
  7. for DISK in $DISKS
  8. do
  9. if [ -b $DISK ] ; then
  10. hdparm -S 12 $DISK > /dev/null
  11. fi
  12. done