Editing Startup script

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
Startup script is a script which is executed at every startup (boot) of the device. It is important to have all custom startup commands under control, you can simply have them in one file as it is described here.
Startup script is a script which is executed at every startup (boot) of the device. It is important to have all custom startup commands under control, you can simply have them in one file as it is described here.
-
==Usage examples==
+
 
 +
=Usage examples=
You can use startup script to:
You can use startup script to:
 +
* set frequencies in kernel (overclocking with titan's kernel)
* set frequencies in kernel (overclocking with titan's kernel)
* set voltages in kernel (undervolting with titan's kernel)
* set voltages in kernel (undervolting with titan's kernel)
-
* set ondemand scheduler parameters (<code>ignore_nice_load</code>, <code>up_threshold</code>, <code>sampling_rate</code>)
+
* set ondemand scheduler parameters (ignore_nice_load, up_threshold, sampling_rate)
* start daemons like [[fcron]]
* start daemons like [[fcron]]
* load kernel modules
* load kernel modules
Line 17: Line 19:
-
It is better to use startup script for setting kernel parameters rather that editing system files (for example <code>/etc/pmconfig</code>), because you can delay the execution of the script or prevent the execution if the reboot loop is detected. The delaying option is described here, but the script to detect the reboot loop has yet to be tested and added.
+
It is better to use startup script for setting kernel parameters rather that editing system files (for example /etc/pmconfig), because you can delay the execution of the script or prevent the execution if the reboot loop is detected. The delaying option is described here, but the script to detect the reboot loop has yet to be tested and added.
 +
 
-
==Script==
+
=Script=
-
The preferred method used is a script in <code>/etc/event.d</code> directory. All scripts in that directory are executed at every boot, but they need to be in proper format in order to work. First of all create a file in /etc/event.d/ directory named as you like, "startup-script" is a good pick for example.
+
The preferred method used is a script in /etc/event.d directory. All scripts in that directory are executed at every boot, but they need to be in proper format in order to work. First of all create a file in /etc/event.d/ directory named as you like, "startup-script" is a good pick for example.
This is an example script that you can modify and put into your startup script:
This is an example script that you can modify and put into your startup script:
Line 42: Line 45:
  end script
  end script
-
Customize the script to your needs and save the file. The part that you need to modify is between "script" and "end script" lines and is like any other shell script except that it doesn't need shebang at the start (<code>#!/bin/sh</code>). The <code>sleep 60</code> command is optional and produces delay in seconds, in the example case one minute. After you have tested your commands, you can remove this command to speed up the process.
+
Customize the script to your needs and save the file. The part that you need to modify is between "script" and "end script" lines and is like any other shell script except that it doesn't need shebang at the start (#!/bin/sh). The <code>sleep 60</code> command is optional and produces delay in seconds, in the example case one minute. After you have tested your commands, you can remove this command to speed up the process.
-
After next reboot, all commands you put in that script will be executed. So make sure that you know what are you doing, it would be unwise to put "<code>reboot</code>" into that script.
+
After next reboot, all commands you put in that script will be executed. So make sure that you know what are you doing, it would be unwise to put "reboot" into that script.
[[Category:Power users]]
[[Category:Power users]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)