From 35dde6748e98a2a7725e220c5ea8f63c7d9c185c Mon Sep 17 00:00:00 2001 From: blogic Date: Wed, 13 Mar 2013 18:11:19 +0000 Subject: [base-files] make basefiles aware of procd Signed-off-by: John Crispin git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36003 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../files.old/lib/firstboot/99_10_with_fo_cleanup | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 package/base-files/files.old/lib/firstboot/99_10_with_fo_cleanup (limited to 'package/base-files/files.old/lib/firstboot') diff --git a/package/base-files/files.old/lib/firstboot/99_10_with_fo_cleanup b/package/base-files/files.old/lib/firstboot/99_10_with_fo_cleanup new file mode 100644 index 000000000..0181b39d4 --- /dev/null +++ b/package/base-files/files.old/lib/firstboot/99_10_with_fo_cleanup @@ -0,0 +1,25 @@ +#!/bin/sh + +# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +with_fo_cleanup() { + # try to get rid of /tmp/root + # this will almost always fail + umount /tmp/root 2>&- + grep -q overlay /proc/filesystems && { + cd / + ( + cd /overlay + find -type l + ) | while read FILE; do + [ -z "$FILE" ] && break + if ls -la "$FILE" 2>&- | grep -q '(overlay-whiteout)'; then + rm -f "$FILE" + fi + done + } + exit 0 +} + +boot_hook_add switch2jffs with_fo_cleanup -- cgit v1.2.3