block-mount: do not auto-mount anonymous mtdblock devices (fixes #10960, #10850)
authorFelix Fietkau <nbd@openwrt.org>
Mon, 13 Feb 2012 15:31:31 +0000 (15:31 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 13 Feb 2012 15:31:31 +0000 (15:31 +0000)
SVN-Revision: 30501

package/block-mount/files/40-mount

index 0d4f66940400fc8cb3874909b4c1c46fd98b34dc..5118d9c1044431579e7b81646136e3f7324e8094 100644 (file)
@@ -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