summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev/udev/init
diff options
context:
space:
mode:
authorRichard Tollerton <rich.tollerton@ni.com>2014-12-08 17:25:10 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-19 18:08:01 +0000
commitc6e8f075a943dd897d7976e29109897856bba821 (patch)
tree0cfcc024810421ffcffcc82b4d7651319282e063 /meta/recipes-core/udev/udev/init
parent7f8634cc90bd09a5052dc4cf465c61003e3d05cd (diff)
downloadpoky-c6e8f075a943dd897d7976e29109897856bba821.tar.gz
udev-cache: don't generate sysconf twice
The udev initscript signals udev-cache to run by generating a new sysconf; but udev-cache now overwrites that with its own copy. To eliminate the needless sysconf generating in udev, we instead trigger udev-cache to run by touching a new file $DEVCACHE_REGEN. (From OE-Core rev: 8d2325be2d03086b7e5a02618edb05b19fbcdc48) 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/init')
-rw-r--r--meta/recipes-core/udev/udev/init5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index ee7967063a..337b6d4c11 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -16,6 +16,7 @@ export TZ=/etc/localtime
16[ -x @UDEVD@ ] || exit 1 16[ -x @UDEVD@ ] || exit 1
17SYSCONF_CACHED="/etc/udev/cache.data" 17SYSCONF_CACHED="/etc/udev/cache.data"
18SYSCONF_TMP="/dev/shm/udev.cache" 18SYSCONF_TMP="/dev/shm/udev.cache"
19DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen
19[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache 20[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
20[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf 21[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
21[ -f /etc/default/rcS ] && . /etc/default/rcS 22[ -f /etc/default/rcS ] && . /etc/default/rcS
@@ -62,6 +63,7 @@ case "$1" in
62 not_first_boot=1 63 not_first_boot=1
63 [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE" 64 [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE"
64 [ -e $SYSCONF_TMP ] && rm -f "$SYSCONF_TMP" 65 [ -e $SYSCONF_TMP ] && rm -f "$SYSCONF_TMP"
66 [ -e "$DEVCACHE_REGEN" ] && rm -f "$DEVCACHE_REGEN"
65 else 67 else
66 # Output detailed reason why the cached /dev is not used 68 # Output detailed reason why the cached /dev is not used
67 if [ "$VERBOSE" != "no" ]; then 69 if [ "$VERBOSE" != "no" ]; then
@@ -70,12 +72,13 @@ case "$1" in
70 echo "udev: cached sysconf: $SYSCONF_CACHED" 72 echo "udev: cached sysconf: $SYSCONF_CACHED"
71 echo "udev: current sysconf: $SYSCONF_TMP" 73 echo "udev: current sysconf: $SYSCONF_TMP"
72 fi 74 fi
75 touch "$DEVCACHE_REGEN"
73 fi 76 fi
74 else 77 else
75 if [ "$ROOTFS_READ_ONLY" != "yes" ]; then 78 if [ "$ROOTFS_READ_ONLY" != "yes" ]; then
76 # If rootfs is not read-only, it's possible that a new udev cache would be generated; 79 # If rootfs is not read-only, it's possible that a new udev cache would be generated;
77 # otherwise, we do not bother to read files. 80 # otherwise, we do not bother to read files.
78 cat -- "$CMP_FILE_LIST" > "$SYSCONF_TMP" 81 touch "$DEVCACHE_REGEN"
79 fi 82 fi
80 fi 83 fi
81 fi 84 fi