kernel: move CONFIG_MIPS_FPU_EMU to generic kernel config
[openwrt.git] / package / e2fsprogs / files / e2fsck.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2008 OpenWrt.org
3 # Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
4
5 START=15
6
7 e2fsck() {
8 local args
9 local cfg="$1"
10
11 config_get device "$cfg" device
12 [ -b "$device" ] || return 0
13
14 config_get fstype "$cfg" fstype
15 case "$fstype" in
16 ext2|ext3|ext4)
17 /usr/sbin/e2fsck -p "$device"
18 local status="$?"
19 case "$status" in
20 0|1) continue;;
21 2) reboot;;
22 4) echo "e2fsck ($device): Warning! Uncorrected errors.";;
23 *) echo "e2fsck ($device): Error $status. Check not complete.";;
24 esac
25 ;;
26 *)
27 ;;
28 esac
29 }
30
31 start() {
32 config_load fstab
33 config_foreach e2fsck mount
34 }
35
This page took 0.056217 seconds and 5 git commands to generate.