summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-06 13:56:50 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-06 13:56:50 +0200
commitf01726d7e2a2d659c3cbc7321737dea112afc650 (patch)
tree9d9ba8b7c919ff389016691b52079b66e2ea47f5
parent6d06af04c6b3c013f33f265ad7a9cca6eae52b7d (diff)
logic still required for partitions on boot device, move fsnet to cifs package
-rw-r--r--package/base-files/Makefile2
-rw-r--r--package/base-files/src/etc/init.d/fs22
-rw-r--r--package/base-files/src/etc/init.d/fsnet20
3 files changed, 23 insertions, 21 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 9377f83d1..f615ac50f 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk
PKG_NAME:= base-files
PKG_VERSION:= 1.0
-PKG_RELEASE:= 85
+PKG_RELEASE:= 86
PKG_SECTION:= base
PKG_DESCR:= basic files and scripts
diff --git a/package/base-files/src/etc/init.d/fs b/package/base-files/src/etc/init.d/fs
index cfa7d5689..29d72168c 100644
--- a/package/base-files/src/etc/init.d/fs
+++ b/package/base-files/src/etc/init.d/fs
@@ -8,4 +8,26 @@
# activate any logical volumes
[ -x /usr/sbin/lvm ] && { lvm vgscan; lvm vgchange -ay; }
+fstypes="ext2 ext3 ext4 xfs vfat ntfs"
+
+# filesystem checks
+for fs in $fstypes; do
+ [ -x /usr/sbin/fsck.$fs ] && {
+ for i in $(grep -v "^#" /etc/fstab|grep $fs|awk '{ print $1}');do
+ echo "Checking filesystem on $i with $fs"
+ fsck -p -t $fs $i
+ done
+ }
+done
+
+# mount local filesystems
+for fs in $fstypes; do
+ grep $fs /proc/filesystems >/dev/null 2>&1
+ if [ $? -eq 0 ];then
+ grep -v "^#" /etc/fstab |grep $fs >/dev/null 2>&1
+ if [ $? -eq 0 ];then
+ mount -a -t $fs
+ fi
+ fi
+done
exit 0
diff --git a/package/base-files/src/etc/init.d/fsnet b/package/base-files/src/etc/init.d/fsnet
deleted file mode 100644
index 75ae760e0..000000000
--- a/package/base-files/src/etc/init.d/fsnet
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#INIT 60
-[[ $1 = autostart ]] || exit 0
-
-# mount net filesystems (nfs/cifs)
-grep nfs /proc/filesystems >/dev/null 2>&1
-if [ $? -eq 0 ];then
- grep -v "^#" /etc/fstab| grep nfs >/dev/null 2>&1
- if [ $? -eq 0 ];then
- mount -a -t nfs
- fi
-fi
-grep cifs /proc/filesystems >/dev/null 2>&1
-if [ $? -eq 0 ];then
- grep -v "^#" /etc/fstab| grep cifs >/dev/null 2>&1
- if [ $? -eq 0 ];then
- mount -a -t cifs
- fi
-fi
-exit 0