Git Product home page Git Product logo

utilities-to-manage-udev-automounting-unmounting's Introduction

udev device management scripts

These scripts manage the mounting and unmounting of devices in response to udev becoming aware of them as unmounted devices.

The scripts supporting udev

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

How these scripts work together

  1. a device is inserted (removed)
  2. udev recieves an 'insertion' (removal) signal with a great deal of infor about the device.
  3. the udev rules file is processed to see if there is a bmatch for the newly mounted device.
  4. 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
  5. The trigger script calls the udev_mount.pl (udev_umount.pl) script.
  6. 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.

utilities-to-manage-udev-automounting-unmounting's People

Contributors

watersibilantfalling avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

kgtone

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.