Root/package/e2fsprogs/files/e2fsck.sh

1#!/bin/sh
2# Copyright 2010 Vertical Communications
3# This is free software, licensed under the GNU General Public License v2.
4# See /LICENSE for more information.
5#
6
7fsck_e2fsck() {
8    e2fsck -p "$device" 2>&1 | logger -t "fstab: e2fsck ($device)"
9    local status="$?"
10    case "$status" in
11        0|1) ;; #success
12        2) reboot;;
13        4) echo "e2fsck ($device): Warning! Uncorrected errors."| logger -t fstab
14            return 1
15            ;;
16        *) echo "e2fsck ($device): Error $status. Check not complete."| logger -t fstab;;
17    esac
18    return 0
19}
20
21fsck_ext2() {
22    fsck_e2fsck "$@"
23}
24
25fsck_ext3() {
26    fsck_e2fsck "$@"
27}
28
29fsck_ext4() {
30    fsck_e2fsck "$@"
31}
32
33append libmount_known_fsck "ext2"
34append libmount_known_fsck "ext3"
35append libmount_known_fsck "ext4"
36

Archive Download this file



interactive