diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-05-06 13:56:50 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-05-06 13:56:50 +0200 |
commit | f01726d7e2a2d659c3cbc7321737dea112afc650 (patch) | |
tree | 9d9ba8b7c919ff389016691b52079b66e2ea47f5 /package/base-files/src/etc/init.d/fs | |
parent | 6d06af04c6b3c013f33f265ad7a9cca6eae52b7d (diff) |
logic still required for partitions on boot device, move fsnet to cifs package
Diffstat (limited to 'package/base-files/src/etc/init.d/fs')
-rw-r--r-- | package/base-files/src/etc/init.d/fs | 22 |
1 files changed, 22 insertions, 0 deletions
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 |