You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
620 B
35 lines
620 B
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2008 OpenWrt.org
|
|
# Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
|
|
START=15
|
|
|
|
e2fsck() {
|
|
local args
|
|
local cfg="$1"
|
|
|
|
config_get device "$cfg" device
|
|
[ -b "$device" ] || return 0
|
|
|
|
config_get fstype "$cfg" fstype
|
|
case "$fstype" in
|
|
ext2|ext3)
|
|
/usr/sbin/e2fsck -p "$device"
|
|
local status="$?"
|
|
case "$status" in
|
|
0|1) continue;;
|
|
2) reboot;;
|
|
4) echo "e2fsck ($device): Warning! Uncorrected errors.";;
|
|
*) echo "e2fsck ($device): Error $status. Check not complete.";;
|
|
esac
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
}
|
|
|
|
start() {
|
|
config_load fstab
|
|
config_foreach e2fsck mount
|
|
}
|
|
|
|
|