forked from akuster/meta-odroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathodroid-c2-init_1.0.bb
51 lines (38 loc) · 1.46 KB
/
odroid-c2-init_1.0.bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
DESCRIPTON = "Startup script for odroid-c2"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"
SRC_URI = "file://odroid-c2-init"
S = "${WORKDIR}"
PR = "r0"
RDEPENDS_${PN} = "bash"
do_install() {
#
# Create directories:
# ${D}${sysconfdir}/init.d - will hold the scripts
# ${D}${sysconfdir}/rcS.d - will contain a link to the script that runs at startup
# ${D}${sysconfdir}/rc5.d - will contain a link to the script that runs at runlevel=5
# ${D}${sbindir} - scripts called by the above
#
# ${D} is effectively the root directory of the target system.
# ${D}${sysconfdir} is where system configuration files are to be stored (e.g. /etc).
# ${D}${sbindir} is where executable files are to be stored (e.g. /sbin).
#
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/rcS.d
#
# Install files in to the image
#
# The files fetched via SRC_URI (above) will be in ${WORKDIR}.
#
install -m 0755 ${WORKDIR}/odroid-c2-init ${D}${sysconfdir}/init.d/
#
# Symbolic links can also be installed. e.g.
#
# ln -s support-script-link ${D}${sbindir}/support-script
#
# Create symbolic links from the runlevel directories to the script files.
# Links of the form S... and K... mean the script when be called when
#
ln -sf ../init.d/odroid-c2-init ${D}${sysconfdir}/rcS.d/S90odroid-c2-init
}