Function | pkg_preinst |
---|---|
Purpose | Called before image is installed to ${ROOT}
|
Sandbox | Disabled |
Privilege | root |
Called for | ebuild, binary |
pkg_preinst
pkg_preinst()
{
return
}
pkg_preinst
pkg_preinst() {
enewgroup foo
enewuser foo -1 /bin/false /dev/null foo
}
pkg_preinst
Tasks
There are a few things that are often done in pkg_preinst
:
pkg_preinst
may be called
after src_compile
, pkg_setup
is the more suitable location for
user creation
—
see Users and Groups.
pkg_preinst
could check a
configuration file in ${ROOT}/etc/
and create a smart updated
version in ${D}/etc/
(see
Install Destinations) rather than
always trying to install the default configuration file (remember
Configuration File Protection).