34 lines
442 B
Plaintext
34 lines
442 B
Plaintext
|
#!/bin/sh
|
||
|
#
|
||
|
|
||
|
load_drivers()
|
||
|
{
|
||
|
while IFS= read -r line; do
|
||
|
modprobe $line
|
||
|
done < "/etc/modules-load.galileo/$1.conf"
|
||
|
}
|
||
|
|
||
|
do_board()
|
||
|
{
|
||
|
board=$(cat /sys/devices/virtual/dmi/id/board_name)
|
||
|
case "$board" in
|
||
|
*"GalileoGen2" )
|
||
|
load_drivers "galileo_gen2" ;;
|
||
|
*"Galileo" )
|
||
|
load_drivers "galileo" ;;
|
||
|
esac
|
||
|
}
|
||
|
|
||
|
case "$1" in
|
||
|
start)
|
||
|
do_board
|
||
|
;;
|
||
|
stop)
|
||
|
;;
|
||
|
restart|reload)
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: $0 {start|stop|restart}"
|
||
|
exit 1
|
||
|
esac
|