Fix device-specific hooks not getting loaded

This commit is contained in:
Maurice Walker 2023-07-26 20:01:04 +02:00 committed by Franco Fichtner
parent f213553e74
commit a044594786
1 changed files with 4 additions and 4 deletions

View File

@ -1085,18 +1085,18 @@ _setup_extras_generic()
_setup_extras_device()
{
if [ ! -f ${DEVICEDIR}/${PRODUCT_DEVICE}.conf ]; then
if [ ! -f ${DEVICEDIR}/${PRODUCT_DEVICE_REAL}.conf ]; then
return
fi
unset -f ${2}_hook
. ${DEVICEDIR}/${PRODUCT_DEVICE}.conf
. ${DEVICEDIR}/${PRODUCT_DEVICE_REAL}.conf
if [ -n "$(type ${2}_hook 2> /dev/null)" ]; then
echo ">>> Begin ${PRODUCT_DEVICE} extra: ${2}_hook"
echo ">>> Begin ${PRODUCT_DEVICE_REAL} extra: ${2}_hook"
${2}_hook ${1}
echo ">>> End ${PRODUCT_DEVICE} extra: ${2}_hook"
echo ">>> End ${PRODUCT_DEVICE_REAL} extra: ${2}_hook"
fi
}