diff options
author | Tom Rini <tom_rini@mentor.com> | 2011-06-21 14:23:12 -0700 |
---|---|---|
committer | Tom Rini <tom_rini@mentor.com> | 2011-06-21 14:25:07 -0700 |
commit | b6838a476a9c448cd994634688ead0815226b9fe (patch) | |
tree | 9a50ceaa06d2a0096ec39ec6fdef5371b2982609 | |
parent | df3e3de4e42f178b406ad5b7863b3120a0c1bdf9 (diff) | |
download | openembedded-b6838a476a9c448cd994634688ead0815226b9fe.tar.gz |
udev: Fix cache problem
When /dev/shm is re-mounted we need to re-create the files that end up
in /etc/udev/saved.*. In addition, udev 124 wasn't making an initial
saved.uname file.
Signed-off-by: Tom Rini <tom_rini@mentor.com>
-rw-r--r-- | recipes/udev/udev.inc | 2 | ||||
-rw-r--r-- | recipes/udev/udev/cache | 13 | ||||
-rw-r--r-- | recipes/udev/udev_124.bb | 1 |
3 files changed, 6 insertions, 10 deletions
diff --git a/recipes/udev/udev.inc b/recipes/udev/udev.inc index ef94f95213..6c25d240cb 100644 --- a/recipes/udev/udev.inc +++ b/recipes/udev/udev.inc @@ -14,7 +14,7 @@ SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ file://init \ file://udev-compat-wrapper-patch" -INC_PR = "r33" +INC_PR = "r34" inherit update-rc.d autotools pkgconfig diff --git a/recipes/udev/udev/cache b/recipes/udev/udev/cache index 62673adbcd..681651d3fa 100644 --- a/recipes/udev/udev/cache +++ b/recipes/udev/udev/cache @@ -9,16 +9,11 @@ echo "Caching udev devnodes" if [ "$DEVCACHE" != "" ]; then echo -n "Populating dev cache" (cd /; tar cf $DEVCACHE dev) - mv /dev/shm/uname /etc/udev/saved.uname - mv /dev/shm/cmdline /etc/udev/saved.cmdline - mv /dev/shm/devices /etc/udev/saved.devices - mv /dev/shm/atags /etc/udev/saved.atags + [ -x /bin/uname ] && /bin/uname -mrspv > /etc/udev/saved.uname || touch /etc/udev/saved.uname + [ -r /proc/cmdline ] && cat /proc/cmdline > /etc/udev/saved.cmdline || touch /etc/udev/saved.cmdline + [ -r /proc/devices ] && cat /proc/devices > /etc/udev/saved.devices || touch /etc/udev/saved.devices + [ -r /proc/atags ] && cat /proc/atags > /etc/udev/saved.atags || touch /etc/udev/saved.atags echo -else - rm -f /dev/shm/uname - rm -f /dev/shm/cmdline - rm -f /dev/shm/devices - rm -f /dev/shm/atags fi exit 0 diff --git a/recipes/udev/udev_124.bb b/recipes/udev/udev_124.bb index 1585d8cf57..9a2f2acd10 100644 --- a/recipes/udev/udev_124.bb +++ b/recipes/udev/udev_124.bb @@ -57,6 +57,7 @@ do_install () { touch ${D}${sysconfdir}/udev/saved.uname touch ${D}${sysconfdir}/udev/saved.cmdline + touch ${D}${sysconfdir}/udev/saved.devices touch ${D}${sysconfdir}/udev/saved.atags install -d ${D}${sysconfdir}/udev/scripts/ |