/usr/share/doc/hdparm/contrib/ultrabayd is in hdparm 9.37-0ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | #!/bin/sh
VERSION="0.1.000"
TPCTL="/usr/bin/tpctl"
IDECTL="/sbin/idectl"
INTERVAL=5
case "$1" in
-V )
echo "$0: Version $VERSION"
exit 0
;;
-daemon )
o_d_type=""
o_d_id=""
while true; do
d_type=""
d_type_n=""
d_id=""
d_id_n=""
while read w1 w2 w3 wn; do
case "$w1" in
device )
case "$w2" in
type: ) d_type=$w3; d_type_n="$wn";;
ID: ) d_id=$w3; d_id_n="$wn";;
esac
;;
esac
if [ "$d_type" ] && [ "$d_id" ]; then
break;
fi
done <<- END
`eval $TPCTL -iU`
END
if [ "$d_type" != "$o_d_type" ] || [ "$d_id" != "$o_d_id" ]; then
echo -n "\07" > /dev/tty1
o_d_type="$d_type"
o_d_id="$d_id"
case "$d_type" in
0x10 )
eval "$IDECTL 1 rescan"
;;
* )
eval "$IDECTL 1 off"
;;
esac
fi
sleep $INTERVAL
done
;;
* )
exec nohup $0 -daemon 2>&1 > /dev/null &
;;
esac
|