From 88c184a9bf550ca3774df364cf95edd0dae611bb Mon Sep 17 00:00:00 2001 From: Richard Tollerton Date: Fri, 24 Jan 2014 00:44:01 -0600 Subject: udev-cache: invalidate on rules.d changes Presently, the cache is not regenerated if udev rules are modified, which may cause the cache to preserve an old configuration. To fix, include the size, mtime, and filename of all udev rules in the system configuration. This change requires `stat`. If busybox supplies stat, CONFIG_FEATURE_STAT_FORMAT must be enabled. (From OE-Core rev: 8847e33b12171a21b7c7e1241198080ad9ef9284) Signed-off-by: Richard Tollerton Signed-off-by: Richard Purdie --- meta/recipes-core/udev/udev/init | 6 ++++++ meta/recipes-core/udev/udev/udev-cache | 5 +++++ 2 files changed, 11 insertions(+) (limited to 'meta/recipes-core/udev') diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init index 32c677a8c0..94dbba37de 100644 --- a/meta/recipes-core/udev/udev/init +++ b/meta/recipes-core/udev/udev/init @@ -22,9 +22,14 @@ DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" [ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" +# List of files whose metadata (size/mtime/name) will be included in cached +# system state. +META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*" + # Command to compute system configuration. sysconf_cmd () { cat -- $CMP_FILE_LIST + stat -L -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}' } [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache @@ -76,6 +81,7 @@ case "$1" in cat <