From 23d98ff980fc428729901b6f93f5d2e84c708bc0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 13 Feb 2012 15:31:31 +0000 Subject: block-mount: do not auto-mount anonymous mtdblock devices (fixes #10960, #10850) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30501 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/block-mount/files/40-mount | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'package/block-mount') diff --git a/package/block-mount/files/40-mount b/package/block-mount/files/40-mount index 0d4f669404..5118d9c104 100644 --- a/package/block-mount/files/40-mount +++ b/package/block-mount/files/40-mount @@ -69,8 +69,13 @@ if [ `basename $blkdev` != "block" ]; then } grep -q "/dev/$device" /proc/swaps || grep -q "/dev/$device" /proc/mounts || { - [ "$anon_mount" -eq 1 ] && [ -z "$use_device" ] && { - ( mkdir -p /mnt/$device && mount /dev/$device /mnt/$device ) 2>&1 | tee /proc/self/fd/2 | logger -t 'fstab' + [ "$anon_mount" -eq 1 -a -z "$use_device" ] && { + case "$device" in + mtdblock*) ;; + *) + ( mkdir -p /mnt/$device && mount /dev/$device /mnt/$device ) 2>&1 | tee /proc/self/fd/2 | logger -t 'fstab' + ;; + esac } } reset_dev_section_cb -- cgit v1.2.3