Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev rule for /media mounting issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Oniryczny
Guru
Guru


Joined: 01 Dec 2011
Posts: 388
Location: Poland

PostPosted: Sat Jun 25, 2016 8:15 pm    Post subject: udev rule for /media mounting issue Reply with quote

Hello

I have found a solution to make drives been mount in /media directory again (instead of /run/media/[user]/)
but it duplicates directories

like I have 'Data'
It made Data, Data1, Data2
Code:

# cat /etc/udev/rules.d/80-media.rules
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1"
#

_________________
cogito ergo sum
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14400

PostPosted: Sat Jun 25, 2016 8:59 pm    Post subject: Reply with quote

Is this post supposed to be a response to someone with a specific issue? Are you seeking help to change how this rule works? You mention that it makes duplicate directories, but not whether this is a general warning to people who might use it or whether you want help to make it do something different.
Back to top
View user's profile Send private message
Oniryczny
Guru
Guru


Joined: 01 Dec 2011
Posts: 388
Location: Poland

PostPosted: Sat Jun 25, 2016 9:17 pm    Post subject: Reply with quote

I want to know or get help how to solve this issude with duplicates and if there's a possibility to make one directory without a duplicate.
_________________
cogito ergo sum
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7200

PostPosted: Sat Jun 25, 2016 10:48 pm    Post subject: Reply with quote

i don't see any problem with your multi-link personally, and udev already is doing that, you can check them all with udevadm info path_to_device.

normally udev allow many rules set for the same device, and udev (or eudev) allow rules from /etc/udev/rules.d to get over ones from /lib/udev/rules.d

so the idea is:
equery f (your_dev_mananger), for udev it would then just be query f udev
it will gives you list of files in the package, so you can locate them.

then find the one that is creating the /run/media/user rules
and if i'm not wrong, just naming your own the same name and putting it in /etc/udev/rules.d should hide the other. Making the other disable.
just make sure to reproduce all rules from the original file and not only your own in the new file to avoid trouble.
Back to top
View user's profile Send private message
Oniryczny
Guru
Guru


Joined: 01 Dec 2011
Posts: 388
Location: Poland

PostPosted: Sun Jun 26, 2016 4:37 pm    Post subject: Reply with quote

thank you for reply
Code:

# equery f udev
 * Searching for udev ...
 * Contents of sys-fs/udev-225-r1:
/bin
/bin/udevadm
/etc
/etc/systemd
/etc/systemd/network
/etc/udev
/etc/udev/hwdb.d
/etc/udev/rules.d
/etc/udev/udev.conf
/lib
/lib/systemd
/lib/systemd/network
/lib/systemd/network/99-default.link
/lib/systemd/systemd-udevd
/lib/udev
/lib/udev/ata_id
/lib/udev/cdrom_id
/lib/udev/collect
/lib/udev/mtd_probe
/lib/udev/rules.d
/lib/udev/rules.d/40-gentoo.rules
/lib/udev/rules.d/50-udev-default.rules
/lib/udev/rules.d/60-block.rules
/lib/udev/rules.d/60-cdrom_id.rules
/lib/udev/rules.d/60-drm.rules
/lib/udev/rules.d/60-evdev.rules
/lib/udev/rules.d/60-persistent-alsa.rules
/lib/udev/rules.d/60-persistent-input.rules
/lib/udev/rules.d/60-persistent-storage-tape.rules
/lib/udev/rules.d/60-persistent-storage.rules
/lib/udev/rules.d/60-persistent-v4l.rules
/lib/udev/rules.d/60-serial.rules
/lib/udev/rules.d/64-btrfs.rules
/lib/udev/rules.d/70-mouse.rules
/lib/udev/rules.d/75-net-description.rules
/lib/udev/rules.d/75-probe_mtd.rules
/lib/udev/rules.d/78-sound-card.rules
/lib/udev/rules.d/80-drivers.rules
/lib/udev/rules.d/80-net-setup-link.rules
/lib/udev/scsi_id
/lib/udev/v4l_id
/lib64
/lib64/libudev.so.1 -> libudev.so.1.6.4
/lib64/libudev.so.1.6.4
/usr
/usr/include
/usr/include/libudev.h
/usr/lib32
/usr/lib32/libudev.so -> libudev.so.1.6.4
/usr/lib32/libudev.so.1 -> libudev.so.1.6.4
/usr/lib32/libudev.so.1.6.4
/usr/lib32/pkgconfig
/usr/lib32/pkgconfig/libudev.pc
/usr/lib64
/usr/lib64/libudev.a
/usr/lib64/libudev.so -> ../../lib64/libudev.so.1.6.4
/usr/lib64/pkgconfig
/usr/lib64/pkgconfig/libudev.pc
/usr/share
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/udevadm
/usr/share/doc
/usr/share/doc/udev-225-r1
/usr/share/doc/udev-225-r1/CODING_STYLE.bz2
/usr/share/doc/udev-225-r1/DISTRO_PORTING.bz2
/usr/share/doc/udev-225-r1/NEWS.bz2
/usr/share/doc/udev-225-r1/README.bz2
/usr/share/doc/udev-225-r1/TODO.bz2
/usr/share/man
/usr/share/man/man5
/usr/share/man/man5/systemd.link.5.bz2
/usr/share/man/man5/udev.conf.5.bz2
/usr/share/man/man7
/usr/share/man/man7/udev.7.bz2
/usr/share/man/man8
/usr/share/man/man8/systemd-udevd.8.bz2
/usr/share/man/man8/udevadm.8.bz2
/usr/share/pkgconfig
/usr/share/pkgconfig/udev.pc
#

there are some rules in /lib/udev/rules.d but I don't know which one it is... :oops:

What string am I supposed to search?
_________________
cogito ergo sum
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum