Files
br2-atoy/board/ttngw/rootfs-overlay/etc/init.d/S10spi
T

40 lines
339 B
Bash
Raw Normal View History

2018-05-15 16:11:21 +02:00
#!/bin/sh
#
# Load SPI modules
#
start() {
printf "Load SPI kernel modules: "
modprobe spi-bcm2835
modprobe spidev
2018-05-15 21:52:34 +02:00
echo "OK"
2018-05-15 16:11:21 +02:00
}
2018-05-15 21:52:34 +02:00
2018-05-15 16:11:21 +02:00
stop() {
2018-05-15 21:52:34 +02:00
return 0
2018-05-15 16:11:21 +02:00
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?