You are not logged in.
Hello guys,
At startup I set some configs by executing rc.local:
[robert@thinkpad ~]$ cat /etc/rc.local
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
# Enabling and controlling fan
echo 1 > /sys/devices/platform/lenovo-sl-laptop/hwmon/hwmon0/pwm1_enable
echo 70 > /sys/devices/platform/lenovo-sl-laptop/hwmon/hwmon0/pwm1
This works quite fine at startup but unfortunately this settings aren't enabled anymore when I resume my system from hibernation so that I have to execute rc.local manually again.
Can this be automatised using Gnome in any way? Maybe by executing rc.local after unlocking the system again?
Regards
Last edited by orschiro (2010-10-28 07:27:31)
Offline
You need to put your commands in an executable file in /etc/pm/sleep.d . See here:
https://wiki.archlinux.org/index.php/Pm-utils
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
Hello lagagnon,
thank you. I read a bit into it.
Here is one working script:
$ cat /etc/pm/sleep.d/60rc.local
#!/bin/sh
. "${PM_FUNCTIONS}"
case $1 in
resume|thaw)
[ -e /etc/rc.local ] && /etc/rc.local &
;;
*)
exit $NA
;;
esac
exit 0
Offline