1 |
On Mar 15, 2012 12:25 AM, "Canek Peláez Valdés" <caneko@×××××.com> wrote: |
2 |
> |
3 |
|
4 |
---- >8 snip |
5 |
|
6 |
> |
7 |
> That if I connect a USB wi-fi dongle, and it appears with the name |
8 |
> wlan23, I want *every* time that dongle to have the wlan23 name .Good |
9 |
> luck doing that without a database. |
10 |
> |
11 |
|
12 |
That could -- should -- be handled by a script or a program that looks up |
13 |
the database, do the checks, and rename the node accordingly. |
14 |
|
15 |
All the device manager got to do is to plug in into the hotplug kernel |
16 |
knob, whereby it will be invoked on every hotplug event, and depending on |
17 |
the nature if the device (which, in your example, fits the pattern "wlan*") |
18 |
fires the script/program which performs the lookup+rename part. |
19 |
|
20 |
mdev can do that. |
21 |
|
22 |
> Bluetooth keyboards. Done, you made my system unbootable when I need |
23 |
> to run fsck by hand after a power failure. |
24 |
> |
25 |
|
26 |
Put it under /bin |
27 |
|
28 |
Done. |
29 |
|
30 |
> Alan, the "vast majority" of Linux users right now are phone users. |
31 |
> That was my initial point some mails ago. What *you* believe are |
32 |
> "regular" users (people like you, or maybe even me), stopped being |
33 |
> true a couple of years ago. The days of the Unix admin and workstation |
34 |
> user are going the way of the dodo. |
35 |
> |
36 |
> At least, that's how I see it. |
37 |
> |
38 |
|
39 |
The vast majority of Linux users, be they using PCs or smartphones, only |
40 |
need a mechanism to handle hotplugs. |
41 |
|
42 |
udev can do it, but so can mdev (with the help of helper scripts/programs). |
43 |
|
44 |
> Again, think about phones. And tablets. And TVs. And |
45 |
> [insert-here-cool-gadgets-from-the-future]. |
46 |
> |
47 |
|
48 |
See above. |
49 |
|
50 |
> No, it's not a matter of "that's the way forward". It's a matter of |
51 |
> trying to solve the general problem. And since the general solution |
52 |
> also solves the simple cases, I don't see a reason to waste my |
53 |
> time/resources in a solution that in the end will not solve the |
54 |
> general problem. |
55 |
> |
56 |
|
57 |
It will always be simpler -- and easier to debug -- if we separate the |
58 |
hotplug handler (whose function is merely to create a dev node with the |
59 |
proper permissions and (optionally) fire up a 'configurator') from the |
60 |
configurator itself. |
61 |
|
62 |
udev is going the kitchen sink route. mdev stays the lego brick path. |
63 |
|
64 |
> Of course, as I have been saying from the beginning, this is |
65 |
> OpenSource. Want to pour some effort into solving the simple cases |
66 |
> that will not help all the community, and that it will only help in |
67 |
> fact a minority, that's your prerogative (and Walt's, and Vapier's, |
68 |
> and everyone else that don't like the "complex" but complete |
69 |
> solution). Go nuts with it if you want. |
70 |
> |
71 |
|
72 |
The code is there; it's called mdev. But your emails are nothing short of |
73 |
denigrating the code. |
74 |
|
75 |
Talk about double standards :-) |
76 |
|
77 |
> But please don't dismiss the general solution as "unnecessary" complex |
78 |
> when it's not the case, and don't think that the "simple" setups |
79 |
> (whatever that means) are the majority. Again, think phones and |
80 |
> tablets: those *are* the majority. |
81 |
> |
82 |
|
83 |
Again, see above. |
84 |
|
85 |
> Oh, for sure you can modify LVM2 to work under mdev. Also |
86 |
> GNOME/KDE/XFCE, and everything under the sun. You have the source; you |
87 |
> can do *anything* you want with it. |
88 |
> |
89 |
> But the effort wasted^^^^^Hpoured in that excercise will only serve a |
90 |
> handful of users, and it will be never accepted upstream, because |
91 |
> upstream is (rightfully) concerned with the general problem. |
92 |
> |
93 |
|
94 |
And as I have explained, based on what Alan had posted, LVM2 (for an |
95 |
example) probably only needs certain device nodes to exist, while mdev's |
96 |
default behavior is to not change anything unless explicitly told. |
97 |
|
98 |
Solvable easily, IMO. |
99 |
|
100 |
> I'm more interested in the general solution that will work not only |
101 |
> for my current machines, but also for the ones I'm planning to have in |
102 |
> the future. I'm dying to get a tablet where I can put GNOME 3 on it; I |
103 |
> can bet you another beer that mdev will be not enough to handle that. |
104 |
> |
105 |
|
106 |
Unfortunately I don't have any Gentoo with GUI, so I can't take up on your |
107 |
offer :-( |
108 |
|
109 |
> With all due respect, Alan (and this is completely sincere, in this |
110 |
> list you are of the guys I respect the most), I believe you are |
111 |
> thinking too small. |
112 |
> |
113 |
|
114 |
With all due respect, I believe *you* are too defensive in regards to udev. |
115 |
|
116 |
> Right now Linux runs in my phone, my TV's, my routers and every |
117 |
> computer I own. I have a couple of Windows installations, which I use |
118 |
> once or twice every three months (I ported a PyGTK program to Windows |
119 |
> last week, so I had to boot into Windows for the first time this |
120 |
> year). I want Linux running on *everything*, and what is more: I don't |
121 |
> want android in my handhelds, I want the full GNOME experience. |
122 |
> |
123 |
> To accomplish that we need udev; mdev it's just not enough. |
124 |
> |
125 |
|
126 |
Again, not necessarily. What exactly in Gnome requires udev? Is it merely |
127 |
expecting some device nodes to exist while mdev's default behavior doesn't |
128 |
do that? That would be simple to solve. |
129 |
|
130 |
A bit more difficult is if Gnome communicates with udev via libudev; but |
131 |
busybox devs have looked into the code of libudev, and found that the |
132 |
functions provided by that lib is can be emulated relatively quickly [1]. |
133 |
But he then added that he won't do that, because that would make busybox |
134 |
too complex. |
135 |
|
136 |
[1] http://lists.busybox.net/pipermail/busybox/2011-September/076689.html |
137 |
|
138 |
Again, it's a matter of perspective. We can work around the problem by |
139 |
having the emulated libudev call mdev indirectly via an "mdev helper |
140 |
program", thus not needing mdev to be a kitchen sink. |
141 |
|
142 |
In fact, a post [2] slightly tangential to the thread of the above post, |
143 |
did just that: provide a way for mdev to be able to link onto netlink |
144 |
without having to make mdev a daemon. |
145 |
|
146 |
[2] http://lists.busybox.net/pipermail/busybox/2011-September/076740.html |
147 |
|
148 |
Rgds, |