-grep rootfs_data /proc/mtd >/dev/null 2>/dev/null && {
- . /sbin/firstboot
- mtd unlock rootfs_data
- jffs2_ready && {
- echo "switching to jffs2"
- mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2 && \
- fopivot /jffs /rom
- } || {
- echo "jffs2 not ready yet; using ramdisk"
- ramoverlay
- }
-} || {
- mtd unlock rootfs
- mount -o remount,rw /dev/root /
+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 "$@"