Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Check if you have the halmount command. It does what you are trying to do. If you have it but you don't want to use it, you can at least read it because it is a python script. ( on my system at least )
The rest of the source package is a tarball of the ivman package. There should be plenty there to study. Maybe you will write your own wrapper for the ivman commands to do what you want, or simply craft the xml rules.
You can also use:
rpm2cpio ivman-0.6.14-72.src.rpm >ivman-0.6.14-72.cpio
cpio -vid < ivman-0.6.14-72.cpio
to extract the files from the rpm.
There is also a halmount.1 man page. However, be sure to study the script before using it. The xml files used by ivman or hal may differ between my setup and yours. HAL works hand in hand with udevinfo when a device is added. Your system may be configured differently. This script uses the label of a filesystem, and udev creates a /dev/disk/by-label/<label> symbolic shortcut to the actual device. The rules for it to do this are in /etc/udev/rules.d/. Your system may not do this as its configured.
Another thing to look at is your system uses the PolicyKit package which may control whether a regular user using a desktop manager can mount a device. The policy kit distinguishes between a user using the desktop or one ssh'ing into the computer and may allow or deny an action accordingly. ( some documentation in /usr/share/doc/policykit/spec/polkit-spec.html if it's installed )
I know this is a lot to digest. I wish there was better documentation on dbus, hal, udev & policy kit and how it all fits together.