vzctl set --devnodes: add /usr/lib/udev/devices

Function dev_create() tries to create a device file in both /dev
(for immediate use) and under udev tree (for device node to appear
after a reboot). For udev, there are many different udev versions
and thus several directories.

There is a change made for vzctl 3.3 in Gentoo vzctl ebuild by
Samuli Suominen <ssuominen@gentoo.org>, patching the function
to set udevdir path provided by 'pkg-config --variable udevdir'.

This is wrong since pkg-config will tell you information about udev
used on the system used to compile vzctl, while the udevdir path
can be quite different inside a container (and different for different
containers). This is the reason why we have a list of those paths
in dev_create() function.

So, while the change in Gentoo is wrong it gives us a hint that the
current list is wrong. Apparently, on Gentoo the command
'pkg-config --variable udevdir' returns /usr/lib/udev, so let's add
/usr/lib/udev/devices to the list.

Not-reported-by: Samuli Suominen <ssuominen@gentoo.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed