Modifying the Startup Script

You can change the startup script to change system behavior.

Overview

Located in the /base/scripts directory, the startup script (startup.sh) is run by the system boot process. Near the end of startup.sh is a list of services that will be run upon startup. For example:
RUN_LEVEL_0_SERVICES=" screen wallpaper dumper tmpfs random filesystem dummynvram pps usb hid calib"
RUN_LEVEL_1_SERVICES=" slm"
Note:

The slm service (called in the second line above) is the System Launch and Monitor (SLM), which can start and stop processes in a certain order. For more information about SLM, including details about its configuration file, see the "System Launch and Monitor (SLM)" chapter in this guide.

Changing the startup.sh script

Since the /base directory is read-only, you'll need to remount it as read-write before you can make any changes:

mount -uw /base

Now you can modify startup.sh (or any other script files under /base/scripts). When you reboot your system, your modified startup.sh will take effect.

Descriptor files

At the top of startup.sh you may have noticed this comment:
# This file is autogenerated from the deployment
# description, DO NOT EDIT

That message refers to the fact that startup.sh is generated from descriptor files that reside in the QNX CAR repository (e.g., target/deployment/startup/car-descriptor.sh). The startup.sh script is further customized in target/boards/board/descriptor.sh by a script in target/boards/regen-startup (called by the mktar utility).

If you modify startup.sh directly, you should incorporate the change into the appropriate descriptor file and then run mktar. This will update the script in the mktar archive, which you would then install on your target board.