summaryrefslogtreecommitdiff
path: root/package/base-files/src/etc/init.d/fs
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/src/etc/init.d/fs')
-rw-r--r--package/base-files/src/etc/init.d/fs53
1 files changed, 2 insertions, 51 deletions
diff --git a/package/base-files/src/etc/init.d/fs b/package/base-files/src/etc/init.d/fs
index f79d9348d..75ae760e0 100644
--- a/package/base-files/src/etc/init.d/fs
+++ b/package/base-files/src/etc/init.d/fs
@@ -2,66 +2,17 @@
#INIT 60
[[ $1 = autostart ]] || exit 0
-# activate swap
-[ -x /sbin/swapon ] && { swapon -a; }
-
-# activate any logical volumes
-[ -x /usr/sbin/lvm ] && { lvm vgscan; lvm vgchange -ay; }
-
-# filesystem checks
-[ -x /sbin/fsck.ext2 ] && {
- for i in $(grep ext2 /etc/fstab|awk '{ print $1}');do fsck.ext2 $i;done;
-}
-[ -x /sbin/fsck.ext3 ] && {
- for i in $(grep ext3 /etc/fstab|awk '{ print $1}');do fsck.ext3 $i;done;
-}
-[ -x /sbin/fsck.ext4 ] && {
- for i in $(grep ext4 /etc/fstab|awk '{ print $1}');do fsck.ext4 $i;done;
-}
-[ -x /sbin/fsck.xfs ] && {
- for i in $(grep xfs /etc/fstab|awk '{ print $1}');do xfs_repair $i;done;
-}
-# local filesystems
-grep ext2 /proc/filesystems >/dev/null 2>&1
-if [ $? -eq 0 ];then
- grep ext2 /etc/fstab >/dev/null 2>&1
- if [ $? -eq 0 ];then
- mount -a -t ext2
- fi
-fi
-grep ext3 /proc/filesystems >/dev/null 2>&1
-if [ $? -eq 0 ];then
- grep ext3 /etc/fstab >/dev/null 2>&1
- if [ $? -eq 0 ];then
- mount -a -t ext3
- fi
-fi
-grep ext4 /proc/filesystems >/dev/null 2>&1
-if [ $? -eq 0 ];then
- grep ext4 /etc/fstab >/dev/null 2>&1
- if [ $? -eq 0 ];then
- mount -a -t ext4
- fi
-fi
-grep xfs /proc/filesystems >/dev/null 2>&1
-if [ $? -eq 0 ];then
- grep xfs /etc/fstab >/dev/null 2>&1
- if [ $? -eq 0 ];then
- mount -a -t xfs
- fi
-fi
-
# mount net filesystems (nfs/cifs)
grep nfs /proc/filesystems >/dev/null 2>&1
if [ $? -eq 0 ];then
- grep nfs /etc/fstab >/dev/null 2>&1
+ 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 cifs /etc/fstab >/dev/null 2>&1
+ grep -v "^#" /etc/fstab| grep cifs >/dev/null 2>&1
if [ $? -eq 0 ];then
mount -a -t cifs
fi