CCilot XA and CCpilot XS
Product revision: 0.12
Software guide
2018-03-19
www.crosscontrol.com
22
Important, remember to use the following command to remount the file system as write protected
again, before shutting down or restarting the device. Note that any changes to the write-protected
file system will be overwritten when performing an operating system upgrade.
# sudo mount –o remount,ro /
7.1.2.
User libraries
To install additional shared libraries, install the library files into
/opt/lib/
. Then, update the used
library cache file by executing the following command:
~# sudo ldconfig -C /opt/etc/ld.so.cache
If additional library file locations are needed, the paths of these can be added to above command as
parameters. The environment variable
$LD_LIBRARY_PATH
can also be used for finding library
files not in the cache.
Library cache file is never automatically updated. But if the file does not exist at system start-up, it
is re-created with default version containing information only about the standard libraries.
7.1.3.
User binaries
Additional binaries such as customer application software or additional open-source solutions are
preferably installed to
/opt/bin/
or
/opt/sbin/
. These directories are available in the standard path,
adding binaries to these locations does not require an update to the
$PATH
environment variable.
If additional levels of binaries are required, the
$PATH
environment variable must be updated
through a start-up script.
7.1.4.
Start-up scripts
The user has the possibility to start applications and scripts by modifying or adding start-up scripts.
When the kernel is started, the start-up script
rc
located in
/etc/init.d/
is executed. Normally, this
script reads start-up scripts under
/etc/rcX.d/,
depending on the actual run level
X
.
The default run level is 3, so applications should at least have startup scripts for this run level. The
rc
script has been modified to parse additionally start-up scripts found in
/opt/etc/rcX.d/
as well
as standard system scripts. The parsing is done in a temporary directory, so scripts from each
source location are interleaved depending on their respective names as described below.
To start applications in run level 3, create a script located in
/opt/etc/rc3.d/
that starts the desired
applications. This is the default run level. Each script must be named
SXXname
, where XX is two
digits and corresponds to the order of the script execution.
Note that these scripts are usually sourced, so no exit should be performed within these scripts, nor
should any application lock the scripts by not performing proper spawning or forking.
The scripts should follow the correct format for the start-stop system to work correctly. For more
information on how the scripts should be created, see standard reference documentation for rc
scripting.
Run level 6 is dedicated for shutdown. When the device is shutting down the scripts from
/etc/rc6.d/
and
/opt/etc/rc6.d/
are executed to perform last clean-up actions. Required naming
and execution order rules comply with start-up level 3, but kill scripts are normally named
KXXname
instead.