X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=package%2Fbase-files%2Ffiles%2Fsbin%2Fmount_root;h=2d73dac53f2a29a6225a1b3581d7aa088c8668ec;hb=feaf88f721ae706a43e144f7b7975d915aad4d7e;hp=607877c643e43aaedb26a3469e55260305048702;hpb=1ebe6d34880d1e26b37fe4f794b5039a8245e750;p=openwrt.git diff --git a/package/base-files/files/sbin/mount_root b/package/base-files/files/sbin/mount_root index 607877c643..2d73dac53f 100755 --- a/package/base-files/files/sbin/mount_root +++ b/package/base-files/files/sbin/mount_root @@ -1,21 +1,26 @@ #!/bin/sh -# Copyright (C) 2006 OpenWrt.org -. /etc/functions.sh +# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2010 Vertical Communications -mount none /proc -t proc -size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)/dev/null 2>/dev/null && { - mtd unlock rootfs - grep rootfs_data /proc/mtd >/dev/null 2>/dev/null && { - . /bin/firstboot - echo "switching to jffs2" - mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2 - fopivot /jffs /rom - } -} || mount -o remount,rw /dev/root / +preinit_essential_hook= +preinit_main_hook= +failsafe_hook= +initramfs_hook= +preinit_mount_root= -mkdir -p /dev/pts -mount none /dev/pts -t devpts -grep sysfs /proc/filesystems >/dev/null && mount -t sysfs none /sys 2>&- +. /lib/functions/boot.sh + +for pi_source_file in /lib/preinit/*; do + . $pi_source_file +done + +# Override function that doesn't apply to use of mount_root as a command rather +# than as part of preinit + +preinit_echo() { + echo "$@" +} + +boot_run_hook preinit_mount_root