X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;ds=sidebyside;f=package%2Fbase-files%2Ffiles%2Flib%2Fpreinit%2F10_check_for_mtd;fp=package%2Fbase-files%2Ffiles%2Flib%2Fpreinit%2F10_check_for_mtd;h=e1f3c07a2a55f00788eea51adb4507d80d6f63e2;hb=a9929695c6ad0779eaa8cb3d68d37760981d55b7;hp=0000000000000000000000000000000000000000;hpb=99c311e86cd7b0ed809a7994eb618819785a6223;p=openwrt-10.03%2F.git diff --git a/package/base-files/files/lib/preinit/10_check_for_mtd b/package/base-files/files/lib/preinit/10_check_for_mtd new file mode 100644 index 000000000..e1f3c07a2 --- /dev/null +++ b/package/base-files/files/lib/preinit/10_check_for_mtd @@ -0,0 +1,20 @@ +#!/bin/sh + +# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +mount_no_mtd() { + mtd unlock rootfs + mount -o remount,rw /dev/root / +} + +check_for_mtd() { + check_skip || { + grep rootfs_data /proc/mtd >/dev/null 2>/dev/null || { + mount_no_mtd && pi_mount_skip_next=true + } + } +} + +boot_hook_add preinit_mount_root check_for_mtd +