aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/udev')
-rw-r--r--meta/recipes-core/udev/udev/udev-cache8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache
index 12f68fb825..dcfff1cb45 100644
--- a/meta/recipes-core/udev/udev/udev-cache
+++ b/meta/recipes-core/udev/udev/udev-cache
@@ -51,9 +51,15 @@ fi
[ "${VERBOSE}" == "no" ] || echo "found."
echo "Populating dev cache"
+err_cleanup () {
+ echo "udev-cache: update failed!"
+ udevadm control --start-exec-queue
+ rm -f -- "$SYSCONF_TMP" "$DEVCACHE_TMP" "$DEVCACHE" "$SYSCONF_CACHED"
+}
+
(
set -e
- trap 'echo "udev-cache: update failed!"' EXIT
+ trap 'err_cleanup' EXIT
udevadm control --stop-exec-queue
sysconf_cmd > "$SYSCONF_TMP"
find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \