:: Re: [DNG] sans dbus/udev (was Re: n…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Didier Kryn
Fecha:  
A: dng
Asunto: Re: [DNG] sans dbus/udev (was Re: new freedesktop "standard": /etc/machine-id)
Le 11/03/2019 à 16:48, karl@??? a écrit :
> Didier:
>> Le 10/03/2019 à 11:22, karl@??? a écrit :
>>> Since nowadays the kernel can provide devtmpfs, what is the role of
>>> udev et al apart from handling usb devices ?
>>     1) Change owner, group and permissions because the kernel defaults
>> everything to root.root and (I guess) 0600
>>
>>     2) Create and populate /dev/disk/by-*, which is sometimes usefull
>> on a desktop or laptop.
>>
>>     3) Rename network devices (for people who want that)
>>
>>     The first 2 items might be done by monitoring /dev with inotify.
>> This must be checked though because, in principle, inotify only reports
>> interactions with the VFS issued from userspace, which is why it doesn't
>> work on /sys and /proc. Inotify works fine when /dev and
>> /dev/disk/by-label are popluated by udev, but I didn't check with
>> devtmpfs. We would then resort to reading the netlink.
> Isn't the above moot if you have a no usb devices and static dev:
>
> 1) changing owner/group/permissions are persistent, i.e. set it once
>     and be done with it

    SInce device files are created when the devices are discovered, you
start from an empty /dev at boot; therefore you need to reassign
owner/group/permission every time. If nothing ever changes, you can of
course do it with a simple script invoked in rc.local.
> 2) isn't that mostly useful for  if you have lots of disks, say more than 5.
>     If you just have one or two, you don't need that.
>     Also that could be generated by a script which you run manually when
>     needed.


    I could imagine all these owner/group/permissions and symlinks
might be managed by a generic script run at boot. But there are devices
which you insert asynchronously, like USB memory sticks, SD cards or
backup disks. It is very convenient, in a laptop/desktop to see the
partition name and label pop up on the screen and only need a mouseclick
to open it.

        Didier