Missed file committing previous change 23110
authorDaniel Dickinson <crazycshore@gmail.com>
Thu, 23 Sep 2010 14:03:22 +0000 (14:03 +0000)
committerDaniel Dickinson <crazycshore@gmail.com>
Thu, 23 Sep 2010 14:03:22 +0000 (14:03 +0000)
SVN-Revision: 23111

package/base-files/files/lib/preinit/41_merge_overlay_hooks [new file with mode: 0644]

diff --git a/package/base-files/files/lib/preinit/41_merge_overlay_hooks b/package/base-files/files/lib/preinit/41_merge_overlay_hooks
new file mode 100644 (file)
index 0000000..df39db1
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+# Copyright (C) 2010 OpenWrt.org
+
+merge_overlay_hooks() {
+       jffs2_not_mounted || [ ! -d /tmp/overlay/lib/preinit ] || {
+               echo "- merge overlay components -"
+
+               mkdir -p /tmp/preinit-hook-merge
+               ln -sf /lib/preinit/* /tmp/overlay/lib/preinit/* /tmp/preinit-hook-merge/
+
+               boot_hook_splice_start
+
+               local pipart
+               for pipart in /tmp/preinit-hook-merge/*; do
+                       . $pipart
+               done
+
+               boot_hook_splice_finish
+
+               rm -rf /tmp/preinit-hook-merge
+       }
+}
+
+boot_hook_add preinit_mount_root merge_overlay_hooks
+#!/bin/sh
+# Copyright (C) 2010 OpenWrt.org
+
+merge_overlay_hooks() {
+       jffs2_not_mounted || [ ! -d /tmp/overlay/lib/preinit ] || {
+               echo "- merge overlay components -"
+
+               mkdir -p /tmp/preinit-hook-merge
+               ln -sf /lib/preinit/* /tmp/overlay/lib/preinit/* /tmp/preinit-hook-merge/
+
+               boot_hook_splice_start
+
+               local pipart
+               for pipart in /tmp/preinit-hook-merge/*; do
+                       . $pipart
+               done
+
+               boot_hook_splice_finish
+
+               rm -rf /tmp/preinit-hook-merge
+       }
+}
+
+boot_hook_add preinit_mount_root merge_overlay_hooks