diff options
| -rw-r--r-- | meta/recipes-core/udev/udev/init | 6 | ||||
| -rw-r--r-- | meta/recipes-core/udev/udev/udev-cache | 5 |
2 files changed, 11 insertions, 0 deletions
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 | |||
| 22 | CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" | 22 | CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" |
| 23 | [ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" | 23 | [ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" |
| 24 | 24 | ||
| 25 | # List of files whose metadata (size/mtime/name) will be included in cached | ||
| 26 | # system state. | ||
| 27 | META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*" | ||
| 28 | |||
| 25 | # Command to compute system configuration. | 29 | # Command to compute system configuration. |
| 26 | sysconf_cmd () { | 30 | sysconf_cmd () { |
| 27 | cat -- $CMP_FILE_LIST | 31 | cat -- $CMP_FILE_LIST |
| 32 | stat -L -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}' | ||
| 28 | } | 33 | } |
| 29 | 34 | ||
| 30 | [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache | 35 | [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache |
| @@ -76,6 +81,7 @@ case "$1" in | |||
| 76 | cat <<EOF | 81 | cat <<EOF |
| 77 | udev: Not using udev cache because of changes detected in the following files: | 82 | udev: Not using udev cache because of changes detected in the following files: |
| 78 | udev: $CMP_FILE_LIST | 83 | udev: $CMP_FILE_LIST |
| 84 | udev: $META_FILE_LIST | ||
| 79 | udev: The udev cache will be regenerated. To identify the detected changes, | 85 | udev: The udev cache will be regenerated. To identify the detected changes, |
| 80 | udev: compare the cached sysconf at $SYSCONF_CACHED | 86 | udev: compare the cached sysconf at $SYSCONF_CACHED |
| 81 | udev: against the current sysconf at $SYSCONF_TMP | 87 | udev: against the current sysconf at $SYSCONF_TMP |
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache index 4d50876b64..571463fa01 100644 --- a/meta/recipes-core/udev/udev/udev-cache +++ b/meta/recipes-core/udev/udev/udev-cache | |||
| @@ -25,9 +25,14 @@ DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen | |||
| 25 | CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" | 25 | CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" |
| 26 | [ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" | 26 | [ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" |
| 27 | 27 | ||
| 28 | # List of files whose metadata (size/mtime/name) will be included in cached | ||
| 29 | # system state. | ||
| 30 | META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*" | ||
| 31 | |||
| 28 | # Command to compute system configuration. | 32 | # Command to compute system configuration. |
| 29 | sysconf_cmd () { | 33 | sysconf_cmd () { |
| 30 | cat -- $CMP_FILE_LIST | 34 | cat -- $CMP_FILE_LIST |
| 35 | stat -L -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}' | ||
| 31 | } | 36 | } |
| 32 | 37 | ||
| 33 | [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache | 38 | [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache |
