aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2016-12-07 16:19:08 +0100
committerJohn Crispin <john@phrozen.org>2016-12-20 09:35:36 +0100
commitb5222924059f5146007a02e33d317f2c04d7dd0b (patch)
treed5f62a6cd79aed861be11e0d68562b52c85884af /package/base-files
parent3c1f20d0bb390f911c3da3334c6d94c19609c8c4 (diff)
downloadupstream-b5222924059f5146007a02e33d317f2c04d7dd0b.tar.gz
upstream-b5222924059f5146007a02e33d317f2c04d7dd0b.tar.bz2
upstream-b5222924059f5146007a02e33d317f2c04d7dd0b.zip
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>
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/lib/functions.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index b3bf2213f4..b68db6b6bd 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -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