source: trunk/package/e2fsprogs/files/e2fsck.sh @ 19877

Last change on this file since 19877 was 19877, checked in by nbd, 6 years ago

add the block-mount package by Daniel Dickinson (cshore), replacing existing automount functionality

File size: 721 bytes
Line 
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"
Note: See TracBrowser for help on using the repository browser.