I haven't figured out what's actually doing the mounting but I did manage to get around the problem by adding the following python script to the end of /etc/rc.local. It might be useful to someone.
#!/usr/bin/env python
# myfstab.py
# My hack to get around the automounting of attached USB connected partitions.
# This problem seems to arise on the 1001 version of the DreamPlug.
# I have not encountered it on the 0901 version.
"""
Creates a file 'sde_mounts' for parsing so that all
/dev/sde partitions can be unmounted and then remounted where
we want them, this time making use of labels.
"""
import os
device = "/dev/sde"
file = "/tmp/sde_mounts"
sleep = "sleep 30"
os.system(sleep) # So that system can complete what it does.
cmd = "mount -l | grep %s > %s"%(device, file,)
os.system(cmd) # Create file for parsing.
# The above command is harmless and need not be commented out.
# If you do comment it out, the rest of the program will fail.
for line in open(file):
if line[:8] == '/dev/sde': # A partition that we want to unmount.
dev = line[:9]
cmd = "umount %s"%(dev, )
# print cmd
os.system(cmd)
fstab = (
("ext3", "rw,auto", "LABEL=/home", "/mnt/Home", ),
("ext3", "rw,auto", "LABEL=TODD", "/mnt/Todd", ),
("ext3", "rw,auto", "LABEL=BU", "/mnt/BU", ),
("ext3", "rw,auto", "LABEL=/usrlocal", "/mnt/oldusrlocal", ),
("ext3", "rw,auto", "LABEL=/var", "/mnt/oldvar", ),
("ext3", "rw,auto", "LABEL=/tmp", "/mnt/oldtmp", )
)
for t in fstab:
cmd = "mount -t %s -o %s %s %s"% t
print cmd
os.system(cmd)
Anyone who chooses to use it will of course need to edit the fstab list of tuples to suit their own needs.