diff options
Diffstat (limited to 'package/base-files/files.old/lib/preinit/41_merge_overlay_hooks')
-rw-r--r-- | package/base-files/files.old/lib/preinit/41_merge_overlay_hooks | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/package/base-files/files.old/lib/preinit/41_merge_overlay_hooks b/package/base-files/files.old/lib/preinit/41_merge_overlay_hooks new file mode 100644 index 0000000..4ca6877 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/41_merge_overlay_hooks @@ -0,0 +1,24 @@ +#!/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/[0-9][0-9]_* /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 |