Sync firmware changes

This commit is contained in:
viktorxda
2024-05-15 14:42:55 +02:00
parent 7e5a91e05a
commit 7d4be64b98

View File

@@ -46,7 +46,7 @@ insert_ko() {
echo isproot /etc/firmware > /dev/ispmid
}
if [ ! -e /sys/module/mhal ]; then
if [ ! -e /sys/module/mi_common ]; then
insert_ko
fi
@@ -56,13 +56,14 @@ detect_sensor
if [ -z "$SENSOR" ]; then
echo -e "\n\e[1;31mSensor parameter MISSING\e[0m\n" | logger -s -t OpenIPC
exit 1
else
echo -e "\n\e[1;32mSensor assigned - $SENSOR\e[0m\n" | logger -s -t OpenIPC
DRIVER=$(ls /sys/module | grep $SENSOR)
if [ -n "$DRIVER" ]; then
rmmod $DRIVER
fi
set_sensor
fi
DRIVER=$(ls /sys/module | grep $SENSOR)
if [ -n "$DRIVER" ]; then
rmmod $DRIVER
fi
echo -e "\n\e[1;32mSensor assigned - $SENSOR\e[0m\n" | logger -s -t OpenIPC
set_sensor
exit 0