1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-27 07:03:54 +02:00
openwrt-xburst/package/e2fsprogs/files/e2fsck.sh
nbd faf7173b4d add the block-mount package by Daniel Dickinson (cshore), replacing existing automount functionality
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19877 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-02-26 22:45:39 +00:00

36 lines
721 B
Bash

#!/bin/sh
# Copyright 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
fsck_e2fsck() {
e2fsck -p "$device" 2>&1 | logger -t "fstab: e2fsck ($device)"
local status="$?"
case "$status" in
0|1) ;; #success
2) reboot;;
4) echo "e2fsck ($device): Warning! Uncorrected errors."| logger -t fstab
return 1
;;
*) echo "e2fsck ($device): Error $status. Check not complete."| logger -t fstab;;
esac
return 0
}
fsck_ext2() {
fsck_e2fsck "$@"
}
fsck_ext3() {
fsck_e2fsck "$@"
}
fsck_ext4() {
fsck_e2fsck "$@"
}
append libmount_known_fsck "ext2"
append libmount_known_fsck "ext3"
append libmount_known_fsck "ext4"