aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-02-13 15:31:31 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-02-13 15:31:31 +0000
commit904ecc215906860a7c6730ab682a9019c0859d61 (patch)
tree8a966246f685fa855f2b6d19b47985c534eb1ebb
parent9cf5926eff62811e7e42de8f9de8bb3dcde52c02 (diff)
downloadupstream-904ecc215906860a7c6730ab682a9019c0859d61.tar.gz
upstream-904ecc215906860a7c6730ab682a9019c0859d61.tar.bz2
upstream-904ecc215906860a7c6730ab682a9019c0859d61.zip
block-mount: do not auto-mount anonymous mtdblock devices (fixes #10960, #10850)
SVN-Revision: 30501
-rw-r--r--package/block-mount/files/40-mount9
1 files changed, 7 insertions, 2 deletions
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