mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 21:32:12 +02:00
udev-cache: improve error handling
If an error occurs while the udev cache is being populated, the system is left in a state where udev is stopped. Remedy this with a clean up function to restart udev and remove any intermediate files. (From OE-Core master rev: af911b272ded95884079dc307eeeb1811f0584c9) (From OE-Core rev: 70214bb02bad6a6f0d6f25ff227d6e380c1b9fb3) Signed-off-by: Ken Sharp <ken.sharp@ni.com> Reviewed-by: Ben Shelton <ben.shelton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
3857acab1a
commit
7b7b67fcef
@@ -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- \
|
||||
|
||||
Reference in New Issue
Block a user