summaryrefslogtreecommitdiff
path: root/meta/recipes-core/systemd
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2013-06-18 12:48:17 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-25 17:30:33 +0100
commit84e0ec2e677fb0236a38478372cdd75797cf5a2e (patch)
tree0080e4d1ac84ada12e598f6bdd10431fddf99de8 /meta/recipes-core/systemd
parentfd9bad3e48a605e9fd28c129413300ff6b548788 (diff)
downloadopenembedded-core-84e0ec2e677fb0236a38478372cdd75797cf5a2e.tar.gz
openembedded-core-84e0ec2e677fb0236a38478372cdd75797cf5a2e.tar.bz2
openembedded-core-84e0ec2e677fb0236a38478372cdd75797cf5a2e.zip
udev-cache: fix to use udev-cache correctly
Previouly, the udev-cache has no real effect even if it's installed into the system. The key problem here is that at first boot, the /etc/dev.tar is not present, thus resulting /dev/shm/udev.cache not created on first boot even if udev-cache is enabled. This patch fixes this problem. The /dev/shm/udev.cache will be created if necessary, that is, on first boot or when some part of the system is changed. In the latter case, the udev cache may not be valid. [YOCTO #4738] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/systemd')
-rw-r--r--meta/recipes-core/systemd/systemd/init6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-core/systemd/systemd/init b/meta/recipes-core/systemd/systemd/init
index 41c41366bd..47a142883c 100644
--- a/meta/recipes-core/systemd/systemd/init
+++ b/meta/recipes-core/systemd/systemd/init
@@ -59,8 +59,12 @@ case "$1" in
if [ "$READDATA" = "$VERSION$CMDLINE$DEVICES$ATAGS" ]; then
(cd /; tar xf $DEVCACHE > /dev/null 2>&1)
not_first_boot=1
+ [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE"
+ [ -e /dev/shm/udev.cache ] && rm -f /dev/shm/udev.cache
+ else
+ echo "$VERSION$CMDLINE$DEVICES$ATAGS" > /dev/shm/udev.cache
fi
-
+ else
echo "$VERSION$CMDLINE$DEVICES$ATAGS" > /dev/shm/udev.cache
fi
fi