Subject: Re: how to spin down a harddisk?
To: Atsushi Onoe <onoe@sm.sony.co.jp>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: port-i386
Date: 08/02/2000 13:01:24
On Wed, 2 Aug 2000, Atsushi Onoe wrote:
> Actually I don't run apm daemon, and I add 'noatime' option as well as
> softupdate for mounting every file system and also add 'nodevmtime' option
> for root file system. Note that with a 'nodevmtime' option, you cannot
> get a useful updated idle time for 'w' nor 'finger'.
That's what I have, thanks for explaining me what the options do, though.
Right now, I have the following in /etc/apm/{line,battery}:
statefile=/tmp/apmstate
# Running on battery...
state=$0
if [ -f $statefile ]; then
oldstate=`cat $statefile`
else
oldstate=
fi
if [ "$oldstate" != "$state" ]; then
noise $S/KDE_Window_DeIconify.wav
mount -u -o noatime,nodevmtime -a
atactl wd0 setstandby 5
atactl wd0 setidle 5
echo $state >$statefile
fi
This seems to work. I guess I'll observe this for a bit longer, then
commit it to share/examples/apm.
- Hubert
--
NetBSD - because Unix isn't just #include <linux.h>, i386, ILP32, ELF, ...!