procd: update to latest git revision
[openwrt.git] / package / base-files / files.old / lib / preinit / 40_mount_jffs2
1 #!/bin/sh
2 # Copyright (C) 2006-2010 OpenWrt.org
3 # Copyright (C) 2010 Vertical Communications
4
5 find_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
11 jffs2_not_mounted() {
12     if [ "$pi_jffs2_mount_success" != "true" ]; then
13         return 0
14     else
15         return 1
16     fi
17 }
18
19 do_mount_jffs2() {
20     check_skip || {
21         find_mount_jffs2 && pi_jffs2_mount_success=true
22     }
23 }
24
25 boot_hook_add preinit_mount_root do_mount_jffs2
26