Where can I put settings that are run with root and last from start of OS till it shuts down?

One requirement is that when I suspend/hibernate my Ubuntu 12.04 and wake it up, the settings should not be changed again.

For example, I would like to set the cpu frequency and the battery charge range. What commands can i put into the files you recommend for the above question?

  • Is there any particular command that you are trying to run? The only way I could think of is using a watch command inside /etc/rc.d. – Ramesh Oct 19 '14 at 16:51
  • some command like these? unix.stackexchange.com/a/162884/674 – Tim Oct 19 '14 at 16:55
  • Suspend systems usually have hooks where you can attach whatever you like - check documentation from your suspend system (probably pm-utils?). – peterph Oct 19 '14 at 16:59
  • rc.local can be used but not best practice also if ubuntu still uses upstart make a foo.conf file in init.d – jgr208 Oct 19 '14 at 17:34
  • why is rc.local not best practice? @jgr208 – Tim Oct 19 '14 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.