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 | |
parent | 87298f0de2bf3cfb615c0e6cdeefee58b0534707 (diff) | |
download | upstream-bfeb96126dedec0133b8fc5138225394a3ab3af3.tar.gz upstream-bfeb96126dedec0133b8fc5138225394a3ab3af3.tar.bz2 upstream-bfeb96126dedec0133b8fc5138225394a3ab3af3.zip |
add the block-mount package by Daniel Dickinson (cshore), replacing existing automount functionality
SVN-Revision: 19877
Diffstat (limited to 'package/e2fsprogs')
-rw-r--r-- | package/e2fsprogs/Makefile | 6 | ||||
-rw-r--r-- | package/e2fsprogs/files/e2fsck.init | 35 | ||||
-rw-r--r-- | package/e2fsprogs/files/e2fsck.sh | 35 |
3 files changed, 38 insertions, 38 deletions
diff --git a/package/e2fsprogs/Makefile b/package/e2fsprogs/Makefile index bf744147bb..3a08db3238 100644 --- a/package/e2fsprogs/Makefile +++ b/package/e2fsprogs/Makefile @@ -1,6 +1,6 @@ # # Copyright (C) 2006-2008 OpenWrt.org -# +# Copyright 2010 Vertical Communications # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # @@ -156,8 +156,8 @@ define Package/e2fsprogs/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(foreach lib,com_err e2p,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/ $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/e2fsck.init $(1)/etc/init.d/e2fsck - + $(INSTALL_DIR) $(1)/lib/functions/fsck + $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/ endef define Package/libuuid/install diff --git a/package/e2fsprogs/files/e2fsck.init b/package/e2fsprogs/files/e2fsck.init deleted file mode 100644 index 4fa231296f..0000000000 --- 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 0000000000..3b34239ce7 --- /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" |