Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hello together,
I'm using a simple shell script for fan speed control (fan_ctrl.sh). I use ffp, so I wrote an autostart script (fan_start.sh).
Unfortunately, running the script prevents the NAS-323 to hibernate. Calling "ps | grep fan" returns entries for both scripts.
Any suggestions, how to run the fan_ctrl script and getting the drives to sleep?
fan_start.sh:
!/ffp/bin/sh
# PROVIDE: sshd
# REQUIRE: LOGIN
. /ffp/etc/ffp.subr
name="fan_ctrl.sh"
command="/ffp/bin/$name"
sshd_flags=
start_cmd="fan_ctrl_start"
fan_ctrl_start()
{
proc_start $command &
}
run_rc_command "$1"fan_ctrl.sh:
MIN=38
MAX=42
while true
do
TEMP=$(temperature g 0 | grep '=' | awk '{print $5}')
if [ $TEMP -lt $MIN ]
then
echo $(date): "Temperature = $TE $TEMP," $(fanspeed s)
else
if [ $TEMP -gt $MAX ]
then
echo $(date): "Temperature = $TE $TEMP," $(fanspeed h)
else
echo $(date): "Temperature = $TE $TEMP," $(fanspeed l)
fi
fi
sleep 60
doneLast edited by En3rGy (2010-03-14 00:12:21)
Offline
You might look at:
http://dns323.kood.org/hardware:fan
Note that a lot of care is taken to avoid any scripts accessing files on the hard drive, which would make it spin up. In your case, it is likely that grep and awk are on the hard disk (maybe in /ffp/bin) and that will keep the hard drive from sleeping.
Offline