January 2018
Intermediate to advanced
456 pages
12h 49m
English
An example snippet showing the installation of a pre-installation script in a recipe is as follows:
pkg_preinst_${PN} () {
# Shell commands
}
All installation scripts work in the same way, with the exception that post-installation scripts may be run either on the host at root filesystem image creation time, on the target (for those actions that cannot be performed on the host), or when a package is directly installed on the target. The following code shows a way to add a post-installation script to a recipe:
pkg_postinst_${PN} () {
if [ x"$D" = "x" ]; then
# Commands to execute on device
else
# Commands to execute on host
fi
}
If the post-installation script succeeds, the package is marked as installed. If the script fails, ...
Read now
Unlock full access