diff options
Diffstat (limited to 'meta/recipes-core/udev/udev/init')
-rw-r--r-- | meta/recipes-core/udev/udev/init | 5 |
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 |
17 | SYSCONF_CACHED="/etc/udev/cache.data" | 17 | SYSCONF_CACHED="/etc/udev/cache.data" |
18 | SYSCONF_TMP="/dev/shm/udev.cache" | 18 | SYSCONF_TMP="/dev/shm/udev.cache" |
19 | DEVCACHE_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 |