I'm using udev to detect USB drive connection and disconnection on my Ubuntu 10.04 LTS x64 server. Everything works fine when USB devices are connected while the machine is running, but if one is already present at boot time, my script does not complete, apparently because mkdir /tmp/blah
doesn't work.
If I subsequently type sudo udevadm trigger
at the terminal, everything is okay.
I'm assuming that at the point that udev first evaluates connected devices against its rules, the root filesystem has not been mounted.
My questions are therefore:
- Have I correctly identified the problem?
- Is there a standard way to solve it - i.e. is there an alterative to
/tmp/
that I can use both before and after/
has been mounted?