Services And Utilities; Services - GARZ&FRICKE GUF-Yocto-34.0-r5756-0-VINCELL User Manual

Embedded computer systems
Table of Contents

Advertisement

GUF-Yocto-34.0-r5756-0

4 Services and utilities

The Garz & Fricke Linux BSP includes several useful services for flexible application handling. Some of them are
just run-once services directly after the OS has been started, others are available permanently.

4.1 Services

The services on Garz & Fricke Yocto Linux systems are usually started with start scripts. This is a very common
technique on Linux systems. Yocto uses the
process after parsing the
[...]
# The default runlevel.
id:5:initdefault:
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS
# What to do in single-user mode.
~~:S:wait:/sbin/sulogin
# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
[...]
As the comments in the file tell, the first script to be run on boot is /etc/init.d/rcS, which executes all start scripts
in /etc/rcS.d. Afterwards, the default runlevel (5) is entered, which makes the start scripts in
executed.
All scripts starting with the character
with the character
K
are executed with the argument
that the
S/K
character is followed by a number which determines the (numeric) execution order.
The actual scripts live in the directory
to those scripts (e.g. /etc/rc5.d/S95myapp).
Those script having the following basic layout, though not all scripts in the image contain the header between
BEGIN
and
###
END. Further documentation for the script format can be found here:
I
https://wiki.debian.org/LSBInitScripts
#!/bin/sh
### BEGIN INIT INFO
# Provides:
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: Start myapp at boot time
# Description:
### END INIT INFO
12
VINCELL
User Manual
¡
¡
/etc/init.d/rc
/etc/inittab
file:
S
are executed with the argument
/etc/init.d
(e.g. /etc/init.d/myapp) while the
myapp
$all
2 3 4 5
0 1 6
script for this purpose. This script is run by the
start
appended, while all scripts starting
stop
appended. Furthermore, the naming convention states
init
being
/etc/rc5.d
/etc/rc*
folders contain links
###
.

Advertisement

Table of Contents
loading

Table of Contents