udev service: verify that hwdb is generated without errors

This commit is contained in:
Nikolay Amiantov 2017-01-12 11:11:20 +03:00
parent f673243aff
commit 6dbcf7d2e9

View file

@ -143,7 +143,10 @@ let
done
echo "Generating hwdb database..."
${udev}/bin/udevadm hwdb --update --root=$(pwd)
# hwdb --update doesn't return error code even on errors!
res="$(${udev}/bin/udevadm hwdb --update --root=$(pwd) 2>&1)"
echo "$res"
[ -z "$(echo "$res" | egrep '^Error')" ]
mv etc/udev/hwdb.bin $out
'';