diff options
Diffstat (limited to 'package/base-files/src/etc')
-rwxr-xr-x | package/base-files/src/etc/init.d/fs | 21 | ||||
-rwxr-xr-x | package/base-files/src/etc/init.d/kmod | 2 |
2 files changed, 17 insertions, 6 deletions
diff --git a/package/base-files/src/etc/init.d/fs b/package/base-files/src/etc/init.d/fs index 202854acc..0e6401351 100755 --- a/package/base-files/src/etc/init.d/fs +++ b/package/base-files/src/etc/init.d/fs @@ -1,5 +1,5 @@ #!/bin/sh -#INIT 20 +#INIT 10 [[ $1 = autostart ]] || exit 0 # activate swap @@ -21,11 +21,15 @@ # mount local filesystems fstypes="ext2 ext3 ext4 xfs vfat ntfs ntfs-3g" for fs in $fstypes; do - disks=$(grep -v "^#" /etc/fstab|grep $fs|awk '{ print $1 }') + procfs=$fs + if [ $fs = "ntfs-3g" ];then + procfs=fuse + fi + disks=$(grep -v "^#" /etc/fstab|grep "${fs}[[:blank:]]"|awk '{ print $1 }') for disk in $disks; do logger -t 'Filesystem' "Found $disk with filesystem $fs" mnt=$(grep -v "^#" /etc/fstab|grep "${disk}[[:blank:]]"|awk '{ print $2 }') - grep $fs /proc/filesystems >/dev/null 2>&1 + grep $procfs /proc/filesystems >/dev/null 2>&1 if [ $? -eq 0 ];then [ -x /usr/sbin/fsck.$fs ] && { logger -t 'Filesystem' "checking $fs filesystem on $disk" @@ -33,9 +37,16 @@ for fs in $fstypes; do } logger -t 'Filesystem' "Mounting $disk to $mnt" mkdir -p $mnt > /dev/null 2>&1 - mount $disk > /dev/null 2>&1 + if [ -b $disk ]; then + mount $disk > /dev/null 2>&1 + else + logger -s -t 'Filesystem' "Skipping mounting $disk, device file missing" + fi + if [ $? -ne 0 ];then + logger -s -t 'Filesystem' "Mounting $disk failed with $?" + fi else - logger -s -t 'Filesystem' "No $fs filesystem in kernel" + logger -s -t 'Filesystem' "No $procfs filesystem in kernel" fi done done diff --git a/package/base-files/src/etc/init.d/kmod b/package/base-files/src/etc/init.d/kmod index 18aeedb42..509496a9e 100755 --- a/package/base-files/src/etc/init.d/kmod +++ b/package/base-files/src/etc/init.d/kmod @@ -1,5 +1,5 @@ #!/bin/sh -#INIT 10 +#INIT 15 [[ $1 = autostart ]] || exit 0 . /etc/functions.sh |