diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-02-26 22:45:39 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-02-26 22:45:39 +0000 |
commit | bfeb96126dedec0133b8fc5138225394a3ab3af3 (patch) | |
tree | 15fc6051ae24767ae1d830fb96f8df8b7064e2a8 /package/e2fsprogs/files | |
parent | 87298f0de2bf3cfb615c0e6cdeefee58b0534707 (diff) | |
download | mtk-20170518-bfeb96126dedec0133b8fc5138225394a3ab3af3.zip mtk-20170518-bfeb96126dedec0133b8fc5138225394a3ab3af3.tar.gz mtk-20170518-bfeb96126dedec0133b8fc5138225394a3ab3af3.tar.bz2 |
add the block-mount package by Daniel Dickinson (cshore), replacing existing automount functionality
SVN-Revision: 19877
Diffstat (limited to 'package/e2fsprogs/files')
-rw-r--r-- | package/e2fsprogs/files/e2fsck.init | 35 | ||||
-rw-r--r-- | package/e2fsprogs/files/e2fsck.sh | 35 |
2 files changed, 35 insertions, 35 deletions
diff --git a/package/e2fsprogs/files/e2fsck.init b/package/e2fsprogs/files/e2fsck.init deleted file mode 100644 index 4fa2312..0000000 --- a/package/e2fsprogs/files/e2fsck.init +++ /dev/null @@ -1,35 +0,0 @@ -#!/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|ext4) - /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 -} - diff --git a/package/e2fsprogs/files/e2fsck.sh b/package/e2fsprogs/files/e2fsck.sh new file mode 100644 index 0000000..3b34239 --- /dev/null +++ b/package/e2fsprogs/files/e2fsck.sh @@ -0,0 +1,35 @@ +#!/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" |