Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    udev - Remove mount directory after boot.


    I am using udev rules for creating a directory as mount point when a usb stick connected and remove this directory when disconnected. What I am not sure how to do is if the computer is turned off / hard power down and usb stick is removed, the directory which was created for usb's mount point remains there on the boot.

    Is there a clean way doing this with udev rules or do I have to write a service script which would control if the usb stick is connected or not and remove the directory accordingly on the start up?


  2. #2
    what I found so far is removing the directory in boot.local if nothing is mounted on that directory.

  3. #3
    Moi nwps,

    Usually, the udev rule handles all this and you should see a directory created that has a name equal to, or similar to, the label on the stick.

    Set up your SuSE desktop to automount the removables.

    You will see that when the stick is inserted, you will get a notification and a choice of what to do next. Choose as appropriate and the*stick will be mounted for you. This is usually at /media/STICKNAME.

    Remove the stick and the directory will disappear also.

    Cheers - VP

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts