These scripts manage the mounting and unmounting of devices in response to udev becoming aware of them as unmounted devices.
12-sdm-mediaByLabel-autoMount-withTriggerScript.rules
the udev rules file.
udev_mount_trigger.sh and udev_umount_trigger.sh
These one, two line trigger scripts are called directly from the udev rules file. These scripts then exit immediatly, having handed responsibility for mounting the device off to a udev_mount or udev_umount script.
It is IMPERATIVE that anything called from a udev rules file exits IMMEDIATELY. That is why a second script is called to do the (slow) device mounting or un-mounting.
udev_mount.pl and udev_umount.pl
These scripts actually mount and un-mount removeable media in response to udev calls.
linksToMountpoints.lst
This is a list of pairs of mount point or mp subdir link to that mountpoint or subdir mount point or mp subdir link to that mountpoint or subdir mount point or mp subdir link to that mountpoint or subdir mount point or mp subdir link to that mountpoint or subdir
The matching, appropriate links are made by the udev_mount_pl script and removed by the udev_umount.pl script
- a device is inserted (removed)
- udev recieves an 'insertion' (removal) signal with a great deal of infor about the device.
- the udev rules file is processed to see if there is a bmatch for the newly mounted device.
- if there is a matching device, then the udev_mount_trigger.pl (udev_umount_trigger.pl) script is called, with information about the device being pssed to the script
- The trigger script calls the udev_mount.pl (udev_umount.pl) script.
- One of the things this mounting (unmounting) script does is to make each of the links, for this device, as listed in the
linksToMountpoints.lst
file.