[PATCH] udev boot script
![](https://secure.gravatar.com/avatar/10a3ceea7f0886152bd6ee6fb28b3579.jpg?s=120&d=mm&r=g)
Hey guys, I was pretty unhappy with the current udev boot script (/sbin/start_udev) which is apparently ripped from Gentoo. Not only is it ugly as hell, it's also sleep(1)ing for a couple of seconds (which is a waste of time on my 2 GHz K8, but worse, perhaps not enough on a P90.) So, here's my version of it. For reference: mark@mjollnir:/usr/ports/core/udev$ svn diff | diffstat -w 72 start_udev | 177 +++-------------------------------------------------- 1 file changed, 13 insertions(+), 164 deletions(-) It'd be nice to get some testing since it's so minimal. If it turns out to work for enough people, it could probably even be merged into /etc/rc{,single} instead of crufting our $PATHs :)
![](https://secure.gravatar.com/avatar/4e374bb9f03cbbca5d9541a8bf8ec8bf.jpg?s=120&d=mm&r=g)
Hey Mark, On Fri, Jul 14, 2006 at 12:47:09 +0200, Mark Rosenstand wrote:
Hey guys,
I was pretty unhappy with the current udev boot script (/sbin/start_udev) [...] So, here's my version of it. For reference:
Do you have a non-patch version of that as well? Maybe I saw that wrongly, but it looks like there's nothing left over from the original anyway. Other than that, I'll check it once I'm home; it looks pretty compact and therefore easier to tweak if needed, although I remember you showed it to Matt before, so maybe there's some reason to keep the old one (other than that it a) just works b) is probably written/reviewed by Greg KH and c) is somewhat maintained by the gentoo folks :-)). Regards, Johannes -- Johannes Winkelmann mailto:jw@smts.ch Zurich, Switzerland http://jw.smts.ch
![](https://secure.gravatar.com/avatar/10a3ceea7f0886152bd6ee6fb28b3579.jpg?s=120&d=mm&r=g)
On Fri, 2006-07-14 at 13:19 +0200, Johannes Winkelmann wrote:
Hey Mark,
On Fri, Jul 14, 2006 at 12:47:09 +0200, Mark Rosenstand wrote:
Hey guys,
I was pretty unhappy with the current udev boot script (/sbin/start_udev) [...] So, here's my version of it. For reference:
Do you have a non-patch version of that as well? Maybe I saw that wrongly, but it looks like there's nothing left over from the original anyway.
Sure, here's the crux of it: /bin/mount -n -t tmpfs udev /dev mkdir /dev/{pts,shm} echo /sbin/udevsend > /proc/sys/kernel/hotplug /bin/cp -a /lib/udev/devices/* /dev /sbin/udevd --daemon /sbin/udevtrigger /sbin/udevsettle
Other than that, I'll check it once I'm home; it looks pretty compact and therefore easier to tweak if needed, although I remember you showed it to Matt before, so maybe there's some reason to keep the old one (other than that it
a) just works
For the few CRUX users that we are, that is. My primary concern with the old script was the use of sleep(1) instead of doing it the correct way.
b) is probably written/reviewed by Greg KH and c) is somewhat maintained by the gentoo folks :-)).
The last time it was touched was in r432 with the commit message "udev: updated to version 078", so even if it's maintained by the Gentoo people, their changes haven't been merged into CRUX. Also, our crux-udev.rules haven't been touched since r659 (almost half a year ago) and my new init script reveals errors in it (%e is deprecated and is completely removed in newer udev versions.) I'd vote for selecting one of the bundled rulesets bundled with udev (it looks like Slackware and Frugalware are our closest neighbours in terms of philosophy, but the Debian and SUSE rules look good as well) and then just patch them to our liking, instead of maintaining (or not...) our own file which is basicly a one year old Gentoo config with a single bugfix applied. Another possibility could be the LFS rules (http://www.linuxfromscratch.org/lfs/downloads/development/udev-config-200607...) which look pretty clean to me. In any case, I hope we can get something more elegant running. I'm giving the entire port a facelift (and update), I'll throw a link to the result on IRC or at this list :)
![](https://secure.gravatar.com/avatar/10a3ceea7f0886152bd6ee6fb28b3579.jpg?s=120&d=mm&r=g)
On Fri, 2006-07-14 at 14:46 +0200, Mark Rosenstand wrote:
In any case, I hope we can get something more elegant running. I'm giving the entire port a facelift (and update), I'll throw a link to the result on IRC or at this list :)
And here it is. Note that the hotplug package is no longer needed, at least on my systems. Give it a spin :) BTW: There are a couple of dead files floating in the repo: crux-udev.rules, devfs_to_udev_README and README (and if my changes are merged, udev.rules as well.)
![](https://secure.gravatar.com/avatar/250d821c3104dc1ea311743ea100cc5a.jpg?s=120&d=mm&r=g)
Hello, Mark. On Fri, 14 Jul 2006 12:47:09 +0200 Mark Rosenstand <mark@borkware.net> wrote:
Hey guys,
I was pretty unhappy with the current udev boot script (/sbin/start_udev) which is apparently ripped from Gentoo. Not only is it ugly as hell, it's also sleep(1)ing for a couple of seconds (which is a waste of time on my 2 GHz K8, but worse, perhaps not enough on a P90.)
Seems to be related: http://lists.crux.nu/pipermail/crux-devel/2006-June/001750.html -- Mikhail Kolesnik ICQ: 260259143 IRC: mike_k at freenode/#crux, rusnet/#yalta Jabber: mike_k@jabber.lafox.net NIC handle: MKK83-UANIC
![](https://secure.gravatar.com/avatar/10a3ceea7f0886152bd6ee6fb28b3579.jpg?s=120&d=mm&r=g)
On Fri, 2006-07-14 at 12:47 +0200, Mark Rosenstand wrote:
Hey guys,
I was pretty unhappy with the current udev boot script (/sbin/start_udev) which is apparently ripped from Gentoo. Not only is it ugly as hell, it's also sleep(1)ing for a couple of seconds (which is a waste of time on my 2 GHz K8, but worse, perhaps not enough on a P90.)
So, here's my version of it. For reference:
mark@mjollnir:/usr/ports/core/udev$ svn diff | diffstat -w 72 start_udev | 177 +++-------------------------------------------------- 1 file changed, 13 insertions(+), 164 deletions(-)
Since the commit message has no sign of it, I'll just point out that it seems to have been merged with minimal changes (well, a *new* added script from Gentoo, which was exactly what I was trying to get rid of...)
participants (3)
-
Johannes Winkelmann
-
Mark Rosenstand
-
Mikhail Kolesnik