base-files: add support for overlaying rootfs content
[openwrt/staging/chunkeey.git] / package / base-files / files / lib / functions.sh
index b3bf2213f4122c044632d0d835f0bc92c2d61491..b68db6b6bd7e419627b8330f5bf31a780f817561 100755 (executable)
@@ -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