Root/package/base-files/files/lib/preinit/40_mount_jffs2

1#!/bin/sh
2# Copyright (C) 2006-2010 OpenWrt.org
3# Copyright (C) 2010 Vertical Communications
4
5find_mount_jffs2() {
6    mkdir -p /tmp/overlay
7    mount -o noatime -t jffs2 "$(find_mtd_part rootfs_data)" /tmp/overlay
8    mtd -qq unlock rootfs_data
9}
10
11jffs2_not_mounted() {
12    if [ "$pi_jffs2_mount_success" != "true" ]; then
13    return 0
14    else
15    return 1
16    fi
17}
18
19do_mount_jffs2() {
20    check_skip || {
21    find_mount_jffs2 && pi_jffs2_mount_success=true
22    }
23}
24
25boot_hook_add preinit_mount_root do_mount_jffs2
26
27

Archive Download this file



interactive