Browse Source

create mountpoint

Waldemar Brodkorb 11 years ago
parent
commit
16b6da6400
1 changed files with 5 additions and 3 deletions
  1. 5 3
      package/base-files/src/etc/init.d/fs

+ 5 - 3
package/base-files/src/etc/init.d/fs

@@ -23,15 +23,17 @@ fstypes="ext2 ext3 ext4 xfs vfat ntfs"
 for fs in $fstypes; do
 	disks=$(grep -v "^#" /etc/fstab|grep $fs|awk '{ print $1 }')
 	for disk in $disks; do
-		logger -t '' "Found $disk with filesystem $fs"
+		logger -t 'Filesystem' "Found $disk with filesystem $fs"
+		mnt=$(grep -v "^#" /etc/fstab|grep "$disk "|awk '{ print $2 }')
 		grep $fs /proc/filesystems >/dev/null 2>&1
 		if [ $? -eq 0 ];then
 			[ -x /usr/sbin/fsck.$fs ] && {
 				logger -t 'Filesystem' "checking $fs filesystem on $disk"
 				fsck -p $disk >/dev/null 2>&1
 			}
-			logger -t '' "Mounting local filesystems"
-			mount $disk >/dev/null 2>&1
+			logger -t 'Filesystem' "Mounting local filesystems"
+			mkdir -p $mnt > /dev/null 2>&1
+			mount $disk
 		else
 			logger -s -t 'Filesystem' "No $fs filesystem in kernel"
 		fi