diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-02-26 22:45:39 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-02-26 22:45:39 +0000 |
commit | faf7173b4df3a152dbdc574751078b359c116d5b (patch) | |
tree | 446e5e5532100cf4c46d1bddfde0a688dbf1c153 /package/e2fsprogs/files | |
parent | a35f8c947088b65dd1524938b59fb9b1e429807c (diff) |
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
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 4fa231296..000000000 --- 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 000000000..3b34239ce --- /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" |