Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-udev-rules
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-udev-rules
Commits
c395e06f
Commit
c395e06f
authored
Aug 10, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial
parent
51def3db
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
90-elphel-automount.rules
90-elphel-automount.rules
+26
-0
static.sh
static.sh
+23
-0
No files found.
90-elphel-automount.rules
0 → 100644
View file @
c395e06f
KERNEL!="sd[a-z][0-9]", GOTO="quit_automount"
# Import file system parameters; these parameters can be obtained with 'udevadm monitor --environment' command
IMPORT{program}="/sbin/blkid -o udev -p %N"
# Device has a label
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
# Device has no file system, do not mount it
ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="", GOTO="quit_automount"
# Device has no label, but has a file system
ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="filesystem", ENV{dir_name}="%k"
# Mount device to /media if it is not SSD
ACTION=="add", ENV{ID_ATA_SATA}!="1", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount /dev/%k /media/%E{dir_name}"
# Mound device to /mnt if it is SSD
ACTION=="add", ENV{ID_ATA_SATA}=="1", RUN+="/bin/mkdir -p /mnt/%E{dir_name}", RUN+="/bin/mount /dev/%k /mnt/%E{dir_name}"
# Delete directory after removal
ACTION=="remove", ENV{ID_ATA_SATA}!="1", ENV{dir_name}!="", RUN+="/bin/rmdir /media/%E{dir_name}"
ACTION=="remove", ENV{ID_ATA_SATA}=="1", ENV{dir_name}!="", RUN+="/bin/rmdir /mnt/%E{dir_name}"
# Exit point
LABEL="quit_automount"
static.sh
0 → 100644
View file @
c395e06f
#!/bin/sh
mknod
-m
0666 /dev/circbuf0 c 135 32
mknod
-m
0666 /dev/circbuf1 c 135 33
mknod
-m
0666 /dev/circbuf2 c 135 34
mknod
-m
0666 /dev/circbuf3 c 135 35
mknod
-m
0666 /dev/jpeghead0 c 135 48
mknod
-m
0666 /dev/jpeghead1 c 135 49
mknod
-m
0666 /dev/jpeghead2 c 135 50
mknod
-m
0666 /dev/jpeghead3 c 135 51
mknod
-m
0666 /dev/exif_exif0 c 125 16
mknod
-m
0666 /dev/exif_exif1 c 125 17
mknod
-m
0666 /dev/exif_exif2 c 125 18
mknod
-m
0666 /dev/exif_exif3 c 125 19
mknod
-m
0666 /dev/exif_meta0 c 125 32
mknod
-m
0666 /dev/exif_meta1 c 125 33
mknod
-m
0666 /dev/exif_meta2 c 125 34
mknod
-m
0666 /dev/exif_meta3 c 125 35
mknod
-m
0666 /dev/exif_template c 125 2
mknod
-m
0666 /dev/exif_metadir c 125 3
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment