base-files: add support for overlaying rootfs content

This adds support for install-overlay define. When used in package it
allows installing files to a special directory that gets copied to the
root when installing it.
It allows overwriting files provided by other packages.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
Rafał Miłecki
2016-12-07 16:19:08 +01:00
committed by John Crispin
parent 3c1f20d0bb
commit b522292405
2 changed files with 14 additions and 0 deletions

View File

@@ -230,6 +230,11 @@ default_postinst() {
ret=$?
fi
if [ -d "$root/rootfs-overlay" ]; then
cp -R $root/rootfs-overlay/. $root/
rm -fR $root/rootfs-overlay/
fi
if [ -z "$root" ] && grep -q -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"; then
. /lib/functions/system.sh
[ -d /tmp/.uci ] || mkdir -p /tmp/.uci