boot: make use of kmodloader if it is available
[openwrt/svn-archive/archive.git] / package / base-files / files / lib / firstboot / 20_reset_clear_jffs
1 #!/bin/sh
2
3 # Copyright (C) 2006-2010 OpenWrt.org
4 # Copyright (C) 2010 Vertical Communications
5
6 reset_clear_jffs() {
7 [ "$reset_has_fo" = "true" ] && {
8 rm -rf $jffs/* 2>&-
9 mount -o remount $jffs / 2>&-
10 exit 0
11 } || reset_has_fo=false
12 }
13
14 boot_hook_add jffs2reset reset_clear_jffs