#!/bin/sh # Make sure the out-of-tree camera driver, the cover-panel spidev driver and # the spi-mux modules are loaded even when the boot-runlevel "modules" service # could not process /etc/modules (it needs /bin/sed, which was missing on some # rootfs builds). HW_MODS="msm8905-cam" if [ "$(cat /usr/share/bananarchy/lid-profile 2>/dev/null)" = "flip" ]; then HW_MODS="$HW_MODS spidev mux-core mux-gpio spi-mux" fi for mod in $HW_MODS; do i=0 while [ "$i" -lt 5 ]; do /sbin/modprobe -q "$mod" && break i=$((i + 1)) sleep 1 done done