Giter Club home page Giter Club logo

yocto-automount's Introduction

yocto-automount

Tool for USB drive mount point redirection from Yocto-Linux to conventional Linux

Note from developer: yocto-automount is not a good approach and a quick solution. Use udev rules to do this. An example:

KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"  
# Import FS infos  
IMPORT{program}="/sbin/blkid -o udev -p %N"  
# Get a label if present, otherwise specify one  
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"  
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"  
# Global mount options  
ACTION=="add", ENV{mount_options}="relatime"  
# Filesystem-specific mount options  
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"  
# Mount the device  
ACTION=="add", RUN+="/bin/mkdir -p /home/root/media-in-the-box-Storage/External_Storage/%E{ID_VENDOR}-%E{ID_MODEL}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /home/root/media-in-the-box-Storage/External_Storage/%E{ID_VENDOR}-%E{ID_MODEL}"  
# Clean up after removal  
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /home/root/media-in-the-box-Storage/External_Storage/%E{ID_VENDOR}-%E{ID_MODEL}", RUN+="/bin/rmdir /home/root/media-in-the-box-Storage/External_Storage/%E{ID_VENDOR}-%E{ID_MODEL}"  
# Exit  
LABEL="media_by_label_auto_mount_end"

yocto-automount's People

Contributors

mozcelikors avatar

Stargazers

 avatar André_Teixeira_1998 avatar Alejandro Fernández-Infante Sánchez-Camacho avatar  avatar Miklós Márton avatar Duygu KEŞKEK avatar

Watchers

James Cloos avatar  avatar

Forkers

martonmiklos

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.