Results 1 to 4 of 4
I'm running Ubuntu 8.10 on my laptop (Rig 4, specs here ), and I have a script in my /etc/rc.local that runs every time I boot. Due to some bugs ...
- 03-30-2009 #1
Launch a script on wake from suspend?
I'm running Ubuntu 8.10 on my laptop (Rig 4, specs here), and I have a script in my /etc/rc.local that runs every time I boot. Due to some bugs in my harddrive controller, my harddrive likes to park itself about every two or three minutes and the noise (not to mention the potential for wearing out the heads) bothers me greatly, so I'm using hdparm to stop it.
However, when I wake from a suspended state the hdparm settings get undone and again I'm stuck with a constantly-clicking harddrive unless I manually run the hdparm script again. I've created a shell script that does this and I can run it, I'm just curious if someone knows of a way I can automate this? Is there perhaps a way to re-run my rc.local?
The script is one line:
It requires root privileges, which in the case of rc.local isn't an issue, but it is when I launch as a regular user. Just something to consider when thinking of solutions.Code:hdparm -B254 /dev/sda
Registered Linux user #270181
TechieMoe's Tech Rants
- 04-02-2009 #2
bump.......
Registered Linux user #270181
TechieMoe's Tech Rants
- 04-02-2009 #3
Moe, have you checked to see if acpid can handle this?
I'm thinking something like putting your command in a script (say, parm.sh), putting the script in /etc/acpi/actions, then adding to the conf file in /etc/acpi/events:
"wakeup" is one of the events in /proc/acpi but I'm not sure if it's the exact one you need. Check here. If that doesn't work, hopefully it will send you down the right path.Code:event=wakeup action=/etc/acpi/actions/parm.sh
- 04-03-2009 #4
Thanks, I'll give that a shot when I get home today.
Registered Linux user #270181
TechieMoe's Tech Rants


Reply With Quote