Hi there
I have made a rc.local file as described in the toturial.
After a reboot i can see that the watchdog is not killed.
I think that the rc.local file is not loaded or executed.
My rc.local file i placed in /shares/MYVOLUME1 with 755 rights.
I want to make my hardidsk spindown.
This is the content of my rc.local file:
#!/bin/sh
pool=`nvram get apps_pool`
share=`nvram get apps_share`
internal_hdd=/dev/ide/host2/bus0/target0/lun0/disc
if [ \! -f /tmp/rc.local.done ]; then
# Indicate we've already done this
touch /tmp/rc.local.done
#
# Mount /opt and connect in various system files
#
if [ -e /shares/${pool}/opt ]; then
mount -o bind /shares/${pool}/opt /opt
cat /proc/mounts > /opt/etc/fstab
ln -s /opt/etc/shells /tmp/shells
ln -s /opt/etc/fstab /tmp/fstab
export PATH=/opt/bin:/opt/sbin:${PATH}
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
fi
# Start utelnetd on local interface only!
/apps/bin/utelnetd -i br0 &
fi
# Sleep for a little bit to not interfere with normal system startup
# before we kill a bunch of Asus processes.
sleep 5
# The killing of watchdog is necessary
# to allow the disk to spin down (watchdog is a horribly written hack
# anyway!)
killall -q -9 watchdog
# Do the necessary steps so the internal HDD will spin down
mount -o remount,noatime,nodiratime /shares/${pool}
hdparm -S 180 ${internal_hdd}
smartctl -dT ${internal_hdd}
When i try to execute the commands manually it failt with the command line
mount -o remount,noatime,nodiratime /shares/${pool}
And i get this error
mount:
Cannot read /etc/fstab: No such file or directory
Can anyone help me?
Allan