1 |
On Tue, May 15, 2012 at 4:23 AM, Greg KH <gregkh@g.o> wrote: |
2 |
> We learned that this is not a good idea at all, and should be left to userspace helper applications |
3 |
> that listen for dbus messages. |
4 |
|
5 |
Could you perhaps expand a bit on those reasons? E.g., I had good |
6 |
experience with the following short script for coupling udev events |
7 |
with autofs: https://github.com/mkdesu/liberte/blob/master/src/usr/local/sbin/ps-mount. |
8 |
Gentoo wiki has a similar tutorial as well. Granted, it is a |
9 |
single-user setup, but I can imagine it being extended to work with |
10 |
ConsoleKit. One obvious problem is mounting encrypted volumes. I |
11 |
thought about moving to e.g., udisks-glue (as a more standard |
12 |
solution), but from what I hear there are too many bugs with udisks at |
13 |
the moment. |
14 |
|
15 |
> Actually with all the hype about mdev these days, why not just use a 3 |
16 |
> year old version of udev (or maybe 4), that is probably what mdev is at |
17 |
> as far as functionality goes. |
18 |
|
19 |
I don't know at what state udev was 3 or 4 years ago, but mdev can: |
20 |
|
21 |
1. Populate /dev (now unnecessary due to devtmpfs). |
22 |
2. Handle ownership, permissions and symlinks to /dev nodes once they |
23 |
appear, according to simple rules (can be probably done with inotify). |
24 |
3. Act as /sbin/hotplug, typically doing something equivalent to this one-liner: |
25 |
[ "${ACTION}" = add -a -n "${MODALIAS}" ] && modprobe -qb "${MODALIAS}" |
26 |
|
27 |
I don't think mdev can do anything else. Building any serious |
28 |
framework on top of mdev seems pointless to me, since it will probably |
29 |
end up as a small subset of udev core reimplemented with scripts. |
30 |
|
31 |
-- |
32 |
Maxim Kammerer |
33 |
Liberté Linux (discussion / support: http://dee.su/liberte-contribute) |