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