diff options
Diffstat (limited to 'recipes-kernel/quark-init/files/quark-init.sh')
-rwxr-xr-x | recipes-kernel/quark-init/files/quark-init.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/recipes-kernel/quark-init/files/quark-init.sh b/recipes-kernel/quark-init/files/quark-init.sh new file mode 100755 index 0000000..e03f454 --- /dev/null +++ b/recipes-kernel/quark-init/files/quark-init.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +load_drivers() +{ + while IFS= read -r line; do + modprobe $line + done < "/etc/modules-load.quark/$1.conf" +} + +do_board() +{ + type dmidecode > /dev/null 2>&1 || die "dmidecode not installed" + board=$(dmidecode -s baseboard-product-name) + case "$board" in *"Galileo" ) load_drivers "galileo" ;; esac +} + +die() +{ + exit 1 +} + +do_board +exit 0 + |