Josh Fisher wrote:
Perhaps a RunBeforeJob is not needed. It seems it should be possible
to use a combination of udev, hal/dbus, and hotplug to insert a USB
drive at a known device node and known mountpoint. Autofs can then be
used to mount/unmount on an as needed basis. This works on Fedora
Core 3 for my ThumbDrive. When I insert the ThumbDrive any needed
kernel modules are loaded, the /dev/jumpdrive device node is created,
and an entry is made to /etc/fstab to mount /dev/jumpdrive at
/media/jumpdrive. It is not yet mounted, but can be mounted via
/bin/mount /media/jumpdrive by a normal user. When I subsequently
issue a command, say /bin/ls /media/jumpdrive, the automount daemon
mounts the device and the ls continues as usual. If I don't access
the drive for a while (5 minutes in this case), the automount daemon
again takes over and umounts the device. As far as I can tell, this
timeout that causes the umount will never occur as long as there is
an open file handle pointing to the device. When I remove the
ThumDrive, the fstab entry, mountpoint, and device node are all
deleted. Most likely the kernel eventually unloads any modules that
are no longer needed as well.
This hint look quite promissing. My aim is not to have the drive
mounted automatically when accessed. Because I want to protect it from
malusers, malware or even letal errors of the root. Therefore it should
not be mounted as long as Bacula is not doing it explicitly.
Still I do not understand it why sd has problem if the drive is not
already mounted when sd starts. If I could change this all would be
much easier.
/M
---
SF.Net email is Sponsored by the Better Software Conference EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile Plan-Driven Development * Managing Projects Teams * Testing QA
Security * Process Improvement Measurement * http://www.sqe.com/bsce5sf
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users