aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev/udev/udev-cache
diff options
context:
space:
mode:
authorRichard Tollerton <rich.tollerton@ni.com>2014-08-22 16:30:54 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-23 23:01:35 +0100
commitf4fcb237da0d1013005e9a0bb2381cfeb4c5316c (patch)
treeb075e48759b51288c2f64025c885e9607c9e817e /meta/recipes-core/udev/udev/udev-cache
parent09089962be353280201ba3899fd5ef9cc3c0ba32 (diff)
downloadopenembedded-core-contrib-f4fcb237da0d1013005e9a0bb2381cfeb4c5316c.tar.gz
udev-cache: parametrize sysconf file paths
The udev-cache facility uses files that represent system states, to ensure that the cache tarball is valid to apply. These paths were hardcoded in several places; collect them into SYSCONF_CACHED and SYSCONF_TMP. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/udev/udev/udev-cache')
-rw-r--r--meta/recipes-core/udev/udev/udev-cache6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache
index aaf1ddd1ac..497d257397 100644
--- a/meta/recipes-core/udev/udev/udev-cache
+++ b/meta/recipes-core/udev/udev/udev-cache
@@ -17,6 +17,8 @@ export TZ=/etc/localtime
[ -f /etc/default/rcS ] && . /etc/default/rcS
DEVCACHE_TMP="/dev/shm/udev-cache-tmp.tar"
+SYSCONF_CACHED="/etc/udev/cache.data"
+SYSCONF_TMP="/dev/shm/udev.cache"
[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
@@ -24,13 +26,13 @@ if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
exit 0
fi
-if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then
+if [ "$DEVCACHE" != "" -a -e "$SYSCONF_TMP" ]; then
echo "Populating dev cache"
find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \
| xargs tar cf "${DEVCACHE_TMP}" -T-
gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
rm -f "${DEVCACHE_TMP}"
- mv /dev/shm/udev.cache /etc/udev/cache.data
+ mv "$SYSCONF_TMP" "$SYSCONF_CACHED"
fi
exit 0