Proper way make symlink to a /dev entry

Skip to first unread message


Jul 28, 2021, 5:59:14 PM7/28/21

My lxc container config contains an entry like this:

lxc.cgroup.devices.allow = c 13:* rwm

This allows me access to these devices in the container.

On the host I have a udev entry that does this:

ATTRS{name}==" flirc Consumer Control", SYMLINK+="flirc"

On the host this results in:

ls -l /dev/flirc
lrwxrwxrwx 1 root root 12 Jul 28 16:17 /dev/flirc -> input/event2

In the container I now want to create a similar symlink.

As a test to make sure things work I manually added a symlink (ln -s
/dev/input/event2 /dev/flirc).  This was done in the container and
worked as expected.

What I want to create a symlink /dev/flirc that points to a device
/dev/input/ that the host created when the usb device was plugged in.  
The actual device name might change.  However, the symlink from
/dev/flirc should not.

I tried using the udev rule in the container but it didn't seem to
work.  I am not sure if it should and can keep working on this if that
is the correct path.

What is the proper way of doing this?
Reply all
Reply to author
0 new messages