[NTLUG:Discuss] Last meeting, you CAN have hotplugged devices automount without desktop
Chris Cox
cjcox at acm.org
Wed Jan 23 23:00:13 CST 2008
Well.. sort of.
You can put the persistent name of the filesystem partition
into /etc/fstab with the mount point
where you want it mounted and then make sure that in the mount options
you have the word hotplug. On openSUSE (and possibly others) there
is a udev rule in /etc/udev/rules.d that calls a helper script
called /lib/udev/mount.sh which looks for the hotplug word inside
of the options and will automatically mount the filesystem
e.g. /etc/fstab
/dev/disk/by-id/usb-Sony_Sony_Camcorder_088D6004E5C6-part1 /sony auto hotplug 0 0
That way you can have devices automount even in runlevel 3.
Btw, in case you are wondering what happens to the old /media mount, seems
that at least in openSUSE under KDE, it sees that the device is mounted
already and just uses that. However, since HAL wasn't utilized in
the mounting process, HAL (the desktop) cannot unmount it... have to
do that manually. And of course in runlevel 3 you'd have to manually
unmount it as well.
I'll have to explore HAL/D-BUS to see if there's anything that can ride
the system level D-BUS even when not GUI so that desktops will
be happier.
More information about the Discuss
mailing list