Lines 8-26
Link Here
|
8 |
# |
8 |
# |
9 |
# ataidle_enable (bool): set to NO by default. |
9 |
# ataidle_enable (bool): set to NO by default. |
10 |
# Set to YES to enable ataidle. |
10 |
# Set to YES to enable ataidle. |
11 |
# ataidle_device: list of devices on which to run ataidle |
11 |
# ataidle_devices: list of devices on which to run ataidle |
12 |
# ataidle_adX: parameters to pass to ataidle(8) |
12 |
# ataidle_adX: parameters to pass to ataidle(8) |
13 |
|
13 |
|
14 |
# Example: |
14 |
# Example: |
15 |
# Put the disks ad1, ad2 and ad3 into Idle mode after 60 |
15 |
# Put the disks ad0, ad1 and ad2 into Idle mode after 60 |
16 |
# minutes and Standby mode after 120 minutes. Also, set the |
16 |
# minutes and Standby mode after 120 minutes. Also, set the |
17 |
# AAM and APM values to their maximum so the drives run at |
17 |
# AAM and APM values to their maximum so the drives run at |
18 |
# their maximum performance. |
18 |
# their maximum performance. |
19 |
# |
19 |
# |
20 |
# ataidle_device="ad1 ad2 ad3" |
20 |
# ataidle_devices="ad0 ad1 ad2" |
21 |
# ataidle_ad1="-I 60 -S 120 -A 127 -P 254 0 1" |
21 |
# ataidle_ad0="-I 60 -S 120 -A 127 -P 254" |
22 |
# ataidle_ad2="-I 60 -S 120 -A 127 -P 254 1 0" |
22 |
# ataidle_ad1="-I 60 -S 120 -A 127 -P 254" |
23 |
# ataidle_ad3="-I 60 -S 120 -A 127 -P 254 1 1" |
23 |
# ataidle_ad2="-I 60 -S 120 -A 127 -P 254" |
24 |
# |
24 |
# |
25 |
|
25 |
|
26 |
. %%RC_SUBR%% |
26 |
. %%RC_SUBR%% |
Lines 37-49
Link Here
|
37 |
|
37 |
|
38 |
ataidle_start() |
38 |
ataidle_start() |
39 |
{ |
39 |
{ |
40 |
if [ -n "${ataidle_device}" ]; then |
40 |
if [ -n "${ataidle_device}" -a -z "${ataidle_devices}" ]; then |
41 |
for i in ${ataidle_device}; do |
41 |
echo "warning: old ataidle rc settings found" |
|
|
42 |
ataidle_devices=${ataidle_device} |
43 |
fi |
44 |
|
45 |
if [ -n "${ataidle_devices}" ]; then |
46 |
for i in ${ataidle_devices}; do |
42 |
eval ataidle_args=\$ataidle_${i} |
47 |
eval ataidle_args=\$ataidle_${i} |
43 |
${command} ${ataidle_args} |
48 |
echo "ATAidle: configuring device /dev/${i}" |
|
|
49 |
${command} ${ataidle_args} /dev/${i} |
44 |
done |
50 |
done |
45 |
fi |
51 |
fi |
46 |
} |
52 |
} |
47 |
|
53 |
|
48 |
run_rc_command "$1" |
54 |
run_rc_command "$1" |
49 |
|
|
|