| Summary: | mdev-start.sh should create /dev/null | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Ed Wildgoose <gentoo> |
| Component: | Current packages | Assignee: | Embedded Gentoo Team <embedded> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
fixed in the tree |
In /lib/rcscripts/addons/mdev-start.sh, function seed_dev(), we need to create /dev/null or else it's not available for use elsewhere in the startup scripts. Now, most of the current scripts supplied with baselayout, *just about* scrape by without tickling this (although you can see on the lines below my ammendments that you would tickle a bug just by having a dev overlay, see the "> /dev/null" ?). But not having /dev/null makes writing all scripts rather tricky and it hits a lot of areas, for example any mdev scripts would also need to avoid using /dev/null (quite a pain) What is happening is that any use of > /dev/null creates a real file in that dir and "mdev -s" doesn't then overwrite this with a proper character device, leading to a broken system Patch is simple and below, grateful if someone could apply it: --- mdev-start.sh.old 2008-02-28 19:35:03 +0000 +++ mdev-start.sh 2008-02-28 19:36:09 +0000 @@ -33,6 +33,9 @@ [ ! -c /dev/console ] && mknod /dev/console c 5 1 [ ! -c /dev/tty1 ] && mknod /dev/tty1 c 4 1 + # Create /dev/null to be able to use it in startup and mdev scripts + [ ! -c /dev/null ] && mknod /dev/null c 1 3 + # copy over any persistant things if [ -d /lib/mdev/devices ] ; then cp --preserve=all --recursive --update /lib/mdev/devices/* /dev 2>/dev/null