1
0
Просмотр исходного кода

enable automatic filesystem checks for devices/partitions in /etc/fstab

Waldemar Brodkorb 15 лет назад
Родитель
Сommit
e675191cfa

+ 1 - 1
package/base-files/Makefile

@@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk
 
 
 PKG_NAME:=		base-files
 PKG_NAME:=		base-files
 PKG_VERSION:=		1.0
 PKG_VERSION:=		1.0
-PKG_RELEASE:=		38
+PKG_RELEASE:=		39
 PKG_SECTION:=		base
 PKG_SECTION:=		base
 PKG_DESCR:=		basic files and scripts
 PKG_DESCR:=		basic files and scripts
 
 

+ 4 - 0
package/base-files/src/etc/rc.shutdown

@@ -0,0 +1,4 @@
+#!/bin/sh
+for i in $(grep -v ^# /etc/fstab |awk '{ print $2 }');do
+	umount $i
+done

+ 1 - 1
package/base-files/src/init

@@ -19,5 +19,5 @@ mdev -s
 mount -o remount,rw /
 mount -o remount,rw /
 cat /etc/.rnd >/dev/urandom 2>&1
 cat /etc/.rnd >/dev/urandom 2>&1
 [ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;}
 [ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;}
-[ -f /etc/fstab ] && mount -a
+[ -f /etc/fstab ] && fsck -p >/dev/null ; mount -a
 exec /sbin/init
 exec /sbin/init

+ 1 - 1
package/busybox/config/e2fsprogs/Config.in

@@ -22,7 +22,7 @@ config BUSYBOX_CHATTR
 
 
 config BUSYBOX_FSCK
 config BUSYBOX_FSCK
 	bool "fsck"
 	bool "fsck"
-	default n
+	default y
 	help
 	help
 	  fsck is used to check and optionally repair one or more filesystems.
 	  fsck is used to check and optionally repair one or more filesystems.
 	  In actuality, fsck is simply a front-end for the various file system
 	  In actuality, fsck is simply a front-end for the various file system

+ 5 - 2
package/e2fsprogs/Makefile

@@ -4,15 +4,17 @@
 include ${TOPDIR}/rules.mk
 include ${TOPDIR}/rules.mk
 
 
 PKG_NAME:=		e2fsprogs
 PKG_NAME:=		e2fsprogs
-PKG_VERSION:=		1.41.12
+PKG_VERSION:=		1.41.13
 PKG_RELEASE:=		1
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		1b24a21fc0c2381ef420961cbfec733f
+PKG_MD5SUM:=		7508a192c7a9471e2128424f4eafac1c
 PKG_DESCR:=		Ext2/3/4 filesystem utilities
 PKG_DESCR:=		Ext2/3/4 filesystem utilities
 PKG_SECTION:=		fs
 PKG_SECTION:=		fs
 PKG_DEPENDS:=		libcom-err libuuid libblkid libpthread
 PKG_DEPENDS:=		libcom-err libuuid libblkid libpthread
 PKG_URL:=		http://e2fsprogs.sourceforge.net/
 PKG_URL:=		http://e2fsprogs.sourceforge.net/
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=e2fsprogs/}
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=e2fsprogs/}
 
 
+PKG_CFLINE_E2FSPROGS:=	default y if ADK_TARGET_ROOTFS_EXT2_BLOCK
+
 PKG_SUBPKGS:=		E2FSPROGS LIBUUID LIBCOM_ERR LIBSS LIBBLKID
 PKG_SUBPKGS:=		E2FSPROGS LIBUUID LIBCOM_ERR LIBSS LIBBLKID
 PKGSD_LIBUUID:=		UUID library
 PKGSD_LIBUUID:=		UUID library
 PKGSC_LIBUUID:=		libs
 PKGSC_LIBUUID:=		libs
@@ -45,6 +47,7 @@ pre-build:
 post-install:
 post-install:
 	${INSTALL_DIR} ${IDIR_E2FSPROGS}/usr/lib ${IDIR_E2FSPROGS}/usr/sbin
 	${INSTALL_DIR} ${IDIR_E2FSPROGS}/usr/lib ${IDIR_E2FSPROGS}/usr/sbin
 	${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck ${IDIR_E2FSPROGS}/usr/sbin/
 	${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck ${IDIR_E2FSPROGS}/usr/sbin/
+	cd $(IDIR_E2FSPROGS)/usr/sbin && ln -sf e2fsck fsck.ext2
 	${INSTALL_BIN} ${WRKINST}/usr/sbin/mke2fs ${IDIR_E2FSPROGS}/usr/sbin/
 	${INSTALL_BIN} ${WRKINST}/usr/sbin/mke2fs ${IDIR_E2FSPROGS}/usr/sbin/
 	${INSTALL_BIN} ${WRKINST}/usr/sbin/tune2fs ${IDIR_E2FSPROGS}/usr/sbin/
 	${INSTALL_BIN} ${WRKINST}/usr/sbin/tune2fs ${IDIR_E2FSPROGS}/usr/sbin/
 	${CP} ${WRKINST}/usr/lib/lib{e2p,ext2fs}.so.* \
 	${CP} ${WRKINST}/usr/lib/lib{e2p,ext2fs}.so.* \