Seems like chore's block mount fsck patches didn't make it into trunk.
the rest seems to be there ..
Regards ede
-------- Original Message --------
Subject: [OpenWrt-Devel] [PATCH] block-*; the right one this time :-/
Date: Thu, 25 Feb 2010 19:29:02 -0500
From: Daniel Dickinson <[email protected]>
Reply-To: OpenWrt Development List <[email protected]>
To: [email protected] <[email protected]>
My humble apologies who tried to do anything with my last patch. It was
the wrong version of what I've been working on. I attach here the
correct version, which doesn't require weird directory settings in
menuconfig, and hence should be much easier to use.
Regards,
Daniel
Index: utils/btrfs-progs/files/btrfsck.sh
===================================================================
--- utils/btrfs-progs/files/btrfsck.sh (revision 0)
+++ utils/btrfs-progs/files/btrfsck.sh (revision 0)
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Copyright (C) 2010 Vertical Communications
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+
+fsck_btrfsck() {
+ btrfsck -p "$device" 2>&1 | logger -t "fstab: btrfsck ($device)"
+ local status="$?"
+ case "$status" in
+ 0|1) ;; #success
+ 2) reboot;;
+ 4) echo "btrfsck ($device): Warning! Uncorrected errors."| logger -t 'fstab'
+ return 1
+ ;;
+ *) echo "btrfsck ($device): Error $status. Check not complete." | logger -t 'fstab';;
+ esac
+ return 0
+}
+
+fsck_btrfs() {
+ fsck_btrfsck "$@"
+}
+
+append libmount_known_fsck "btrfs"
+
Index: utils/btrfs-progs/Makefile
===================================================================
--- utils/btrfs-progs/Makefile (revision 19783)
+++ utils/btrfs-progs/Makefile (working copy)
@@ -1,6 +1,7 @@
#
# Copyright (C) 2009 OpenWrt.org
#
+# Copyright 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
@@ -48,6 +49,9 @@
define Package/btrfs-progs/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs)) $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/lib/functions/fsck
+ $(INSTALL_BIN) ./files/btrfsck.sh $(1)/lib/functions/fsck/
endef
$(eval $(call BuildPackage,btrfs-progs))
+
Index: utils/reiserfsprogs/files/reiserfsck.sh
===================================================================
--- utils/reiserfsprogs/files/reiserfsck.sh (revision 0)
+++ utils/reiserfsprogs/files/reiserfsck.sh (revision 0)
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Copyright 2010 Vertical Communications
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+fsck_reiserfsck() {
+ reiserfsck -p "$device" 2>&1 | logger -t "fstab: reiserfsck ($device)"
+ local status="$?"
+ case "$status" in
+ 0|1) ;; #success
+ 2) reboot;;
+ 4|6) echo "reiserfsck ($device): Warning! Uncorrected errors."| logger -t fstab
+ return 1
+ ;;
+ *) echo "reiserfsck ($device): Error $status. Check not complete." | logger -t fstab;;
+ esac
+ return 0
+}
+
+fsck_reiserfs() {
+ fsck_reiserfsck "$@"
+}
+
+append libmount_known_fsck "reiserfs"
+
Index: utils/reiserfsprogs/Makefile
===================================================================
--- utils/reiserfsprogs/Makefile (revision 19783)
+++ utils/reiserfsprogs/Makefile (working copy)
@@ -1,6 +1,6 @@
#
# Copyright (C) 2006-2009 OpenWrt.org
-#
+# Copyright 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
@@ -38,6 +38,9 @@
$(INSTALL_BIN) $(foreach bin,debugreiserfs mkreiserfs reiserfsck reiserfstune resize_reiserfs,$(PKG_INSTALL_DIR)/usr/sbin/$(bin)) $(1)/usr/sbin/
ln -sf mkreiserfs $(1)/usr/sbin/mkfs.reiserfs
ln -sf reiserfsck $(1)/usr/sbin/fsck.reiserfs
+ $(INSTALL_DIR) $(1)/lib/functions/fsck
+ $(INSTALL_BIN) ./files/reiserfsck.sh $(1)/lib/functions/fsck/
endef
$(eval $(call BuildPackage,reiserfsprogs))
+
Index: utils/dosfstools/files/dosfsck.sh
===================================================================
--- utils/dosfstools/files/dosfsck.sh (revision 0)
+++ utils/dosfstools/files/dosfsck.sh (revision 0)
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Copyright 2010 Vertical Communications
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+fsck_dosfsck() {
+ reiserfsck -p "$device" 2>&1 | logger -t "fstab: dosfsck ($device)"
+ local status="$?"
+ case "$status" in
+ 0) ;; #success
+ 1) echo "dosfsck ($device): Warning! Errors detected."| logger -t fstab
+ return 1
+ ;;
+ *) echo "dosfsck ($device): Usage error. Device not checked".| logger -t fstab;;
+ esac
+ return 0
+}
+
+fsck_vfat() {
+ fsck_dosfsck "$@"
+}
+
+fsck_msdos() {
+ fsck_dosfsck "$@"
+}
+
+
+append libmount_known_fsck "vfat"
+append libmount_known_fsck "msdos"
+
Index: utils/dosfstools/Makefile
===================================================================
--- utils/dosfstools/Makefile (revision 19783)
+++ utils/dosfstools/Makefile (working copy)
@@ -1,6 +1,6 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
-#
+# Copyright 2010 Vertical Communications
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
@@ -29,6 +29,10 @@
TITLE:=dosfsck
endef
+define Package/dosfsck/config
+ select PACKAGE_block-dosfsck if PACKAGE_block-mount
+endef
+
define Package/dosfslabel
$(call Package/dosfstools/Default)
TITLE:=dosfslabel
@@ -76,6 +80,8 @@
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dosfsck $(1)/usr/sbin/
(cd $(1)/usr/sbin; ln -sf dosfsck fsck.msdos; ln -sf dosfsck fsck.vfat)
+ $(INSTALL_DIR) $(1)/lib/functions/fsck
+ $(INSTALL_BIN) ./files/dosfsck.sh $(1)/lib/functions/fsck/
endef
define Package/dosfslabel/install
@@ -92,3 +98,5 @@
$(eval $(call BuildPackage,dosfsck))
$(eval $(call BuildPackage,dosfslabel))
$(eval $(call BuildPackage,mkdosfs))
+
+
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel